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

Wesley Krasko wesblake at gmail.com
Tue Nov 19 18:32:32 CET 2019

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
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
"Stay away from negative people. They have a problem for every solution."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20191119/7be5d4e4/attachment.html>

More information about the Interest mailing list