[Interest] Qt6 QQuickRenderControl examples missing?
Nuno Santos
nuno.santos at imaginando.pt
Mon Nov 8 09:35:41 CET 2021
Hi,
I have an application that requires off screen rendering into a texture. That texture will then be used to be displayed in the main application, record to video file, or share with other running applications. I’ve based myself in the past in Qt Examples to make this happen, successfully.
Now that I’m trying to port this application to Qt 6 I’ve stumbled on something I wasn’t expecting. There are only two examples of QQuickRenderControl and one relies on OpenGL and the other one is for DirectX
https://doc-snapshots.qt.io/qt6-dev/qtquick-rendercontrol-rendercontrol-opengl-example.html <https://doc-snapshots.qt.io/qt6-dev/qtquick-rendercontrol-rendercontrol-opengl-example.html>
https://doc-snapshots.qt.io/qt6-dev/qtquick-rendercontrol-rendercontrol-d3d11-example.html <https://doc-snapshots.qt.io/qt6-dev/qtquick-rendercontrol-rendercontrol-d3d11-example.html>
One of the key advantages of using Qt 6, and please correct me if I’m wrong, is the fact that it does rely on Metal on Mac, DirectX on Windows, and so on, making it more performance and future proof since OpenGL is being deprecated.
On the the updated Qt6 example for QQuickRenderControl, it is mandatory that we use OpenGL as surface type otherwise it won’t work. The offscreen renderer is rendering to a OpenGL surface to be then displayed on a OpenGL backed window. This was not what I was expecting. I was expecting to have a QQuickRenderControl example that shows how to offscreen render to a native surface that could be displayed in the same native window. If I’m on Mac or iOS I want that to be metal to be the most performant as possible. Also, on platforms like M1 from Apple, the OpenGL stack seems to have bugs that lead to:
https://bugreports.qt.io/browse/QTBUG-89803 <https://bugreports.qt.io/browse/QTBUG-89803>
https://bugreports.qt.io/browse/QTBUG-97981 <https://bugreports.qt.io/browse/QTBUG-97981>
What is the point of having a QQuickRenderControl class if I can’t draw offscreen to a native surface and use it transparently? Is just a matter of lacking examples or is this a limitation?
I would’t need to do a offscreen render if I could grab the contents of a certain QQuick in a performant manner. Does Qt 6 offer any new way of doing this?
Thanks!
Best regards,
Nuno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20211108/eae004a5/attachment.html>
More information about the Interest
mailing list