Qt 6.0's 3D Renderer Is Much Improved But More Work Remains
With Qt 6.0 due to be released in December, Qt-minded consulting firm KDAB has published a blog post outlining the extensive 3D renderer improvements made for this big toolkit update. While Qt6's 3D rendering abilities are much improved, there still is further work ahead.
The Qt 3D renderer is much improved with Qt6 and now features good support for not only OpenGL but also the likes of Direct3D and Vulkan via the RHI (Rendering Hardware Interface) abstraction layer that has come together nicely. Also significant with Qt 6.0 is the render thread has been eliminated since it really only worked out well with Qt 3D by itself but not in conjunction with Qt Quick. Due to the render thread still blocking at times, such as when needing to sync Qt Quick and Qt 3D content, the render thread hasn't worked out too well. Plus the complexities around thread management and extra resources made it more clear for Qt 6.0 to just eliminate the separate render thread.
Qt 6.0 has also switched from using QVector to std::vectors and other C++ std features where available in order to reduce the overhead of Qt containers. Meanwhile with the RHI abstraction code has continued maturing since Qt 5.15 and is offering good support across Direct3D, Vulkan, OpenGL, and Metal -- Qt 6.0 should use the RHI render code by default over the OpenGL render plug-in directly. Code restructuring also allows for more dedicated render plug-ins in the future if needed.
Current API limitations of Qt 3D include the inability to set memory barriers explicitly along with not all texture formats necessarily being available. Additionally, geometry shaders and other features are still missing.
Another unfortunate limitation of the state in Qt 6.0 is that there is no Qt 3D multi-threading support with the RHI plug-ins. So while Vulkan and other modern graphics APIs can enjoy threading, the RHI abstraction layer needs to serially generate commands from a single thread. As a result, don't expect any big performance wins today of using Qt6 on say Vulkan rather than OpenGL.
More details on the Qt 3D renderer state in Qt 6.0 via this KDAB blog post.
The Qt 3D renderer is much improved with Qt6 and now features good support for not only OpenGL but also the likes of Direct3D and Vulkan via the RHI (Rendering Hardware Interface) abstraction layer that has come together nicely. Also significant with Qt 6.0 is the render thread has been eliminated since it really only worked out well with Qt 3D by itself but not in conjunction with Qt Quick. Due to the render thread still blocking at times, such as when needing to sync Qt Quick and Qt 3D content, the render thread hasn't worked out too well. Plus the complexities around thread management and extra resources made it more clear for Qt 6.0 to just eliminate the separate render thread.
Qt 6.0 has also switched from using QVector to std::vectors and other C++ std features where available in order to reduce the overhead of Qt containers. Meanwhile with the RHI abstraction code has continued maturing since Qt 5.15 and is offering good support across Direct3D, Vulkan, OpenGL, and Metal -- Qt 6.0 should use the RHI render code by default over the OpenGL render plug-in directly. Code restructuring also allows for more dedicated render plug-ins in the future if needed.
Current API limitations of Qt 3D include the inability to set memory barriers explicitly along with not all texture formats necessarily being available. Additionally, geometry shaders and other features are still missing.
Another unfortunate limitation of the state in Qt 6.0 is that there is no Qt 3D multi-threading support with the RHI plug-ins. So while Vulkan and other modern graphics APIs can enjoy threading, the RHI abstraction layer needs to serially generate commands from a single thread. As a result, don't expect any big performance wins today of using Qt6 on say Vulkan rather than OpenGL.
More details on the Qt 3D renderer state in Qt 6.0 via this KDAB blog post.
5 Comments