[Interest] Best way to threaded render (images) going forward?

David M. Cotter dave at kjams.com
Tue Nov 19 19:33:07 CET 2019

+1 on this please

is someone working on something like QNativeGraphics, which picks the best impl under the hood? eg: metal for macos, opengl for linux, and whatever it is now for windows?

the writing is on the wall for OpenGL on mac, what are the future plans for that?

> On Nov 19, 2019, at 9:32 AM, Wesley Krasko <wesblake at gmail.com> wrote:
> Hello all, I was sent here from the Qt forum for more "technical" questions.
> We have an app, it runs on Linux, Windows, and Mac OS. It is a video relay app. The video is supplied via an SDK, I subclass one of their classes and re-implement a lock and unlock function. On lock the SDK writes the current frame/image into a buffer I supply (raw image data, I'm using a QImage at the moment) then on unlock it says "ready" and I can draw it. This is happening about 60fps.
> So, at the moment I have 2 methods. One is a QGLWidget based class where I use a QPainter in another thread to draw the QImage when ready. Its very fast, no impact on GUI thread, on all platforms. However, there's a known bug in Qt causing loss of style under Windows so I then had to do a backup D2D method, non-threaded so it does not perform nearly as well.
> Fast forward to today. We ran into all kinds of issues with Mac OS Catalina and the beginning of their loss of support for OpenGL. We were able to mitigate this for now by sticking with Mojave + Xcode 10 to build.
> I would like to solve this once and for all hopefully. One threaded rendering method I can use across all platforms. I know RHI is coming but it looks like it's for Quick. I know that QGLWidget is deprecated and moving to QOpenGLWidget might solve things but will it be future proof on Mac? Also, in my attempts to move to this thus far, I can thread if I use open gl commands directly but am no longer able to use QPainter in the thread.
> Any suggestions on the best method going forward? I think I've read on everything, QGraphicsView/Scene, RHI, etc and either the documentation/examples are lacking or what I need to do doesn't seem doable which I find odd, this seems like it would be a common use case to render video frames! Thanks.
> -- 
> Wes Krasko
> www.worldwidewes.com <http://www.worldwidewes.com/> 
> www.kraskofamily.com <http://www.kraskofamily.com/>
> "Stay away from negative people. They have a problem for every solution."
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20191119/730357fa/attachment.html>

More information about the Interest mailing list