Hi all, As outlined by Jani a few weeks ago [1], Qt 6.0 is expected to have a Structure and Platform Freeze at the end of June. One essential piece there is the graphics story. After evolving for some years (Qt Contributor Summit 2017, 2018, 2019 notes can be found in [2], [3] [4]), the plan described last spring [5] has been progressing nicely. We are now moving on to flip a few switches in the dev branch in order to begin switching over to the new rendering architecture in earnest.
This affects Qt Quick and dependent modules at the moment. Plain widget applications, and this includes QOpenGLWindow and QOpenGLWidget, are not currently affected by this work. (apart from minor restructuring, such as moving most QOpenGL* convenience classes into the Qt OpenGL module, out from Qt Gui). As the documentation [6] describes, Qt 5.14 and 5.15 have shipped the new, graphics API abstracted Qt Quick scenegraph rendering engine as an experimental, opt-in feature, meaning one had to set an environment variable or call some C++ APIs to enable it. The same applies to the dev branch as of today. This is what's going to change now. == Phase One == As the first step, the defaults will be switched around. Instead of opting in by setting the environment variable QSG_RHI=1, one can now opt out, if desired, by setting QSG_NO_RHI=1. This switch is expected to happen as soon as possible. (i.e. today or the next few days at latest) This is a temporary, short-term measure. The direct OpenGL rendering path is kept available to make testing and transitioning easier. However, this will disappear in the coming weeks. In fact, some leaf modules, like Qt Quick 3D, have during the last few days already merged patches that purge their direct OpenGL rendering backends, leaving only the new, QRhi-based rendering code path in place. This shows that we are in good shape, and can likely keep the length of this phase quite short, moving on to phase two as quickly as possible. This phase presents no source breaks, meaning all modules and applications continue to compile as-is, but advanced usages of Qt Quick, that are not compatible with the RHI-based graphics stack, may trigger run time breaks. == Phase Two == Purging the direct OpenGL bits in Qt Quick is work in progress, although none of the patches are merged yet. In this second phase we are going to proceed with that work, which means the possibility of opting out (QSG_NO_RHI) will disappear. This is the point where one may encounter source breaks due to deprecated and/or OpenGL-specific APIs being removed or replaced by new alternatives. This will typically affect advanced use cases only, such as application code that implements custom scenegraph materials, or deals with integrating external rendering engines with Qt Quick. For those interested in more details, there is a set of blog posts [7] [8] [9] from last year introducing the new approach to handling graphics APIs and shaders. The recording of a Qt World Summit 2019 talk is also available at [10]. The slides from the March 2020 webinar [11] give the most up-to-date overview as of now, but there is also going to be a session at this week's Qt Virtual Tech Con 2020 [12] (look for "Accelerated 2D / 3D Graphics in Qt 6") Best regards, Laszlo [1] https://lists.qt-project.org/pipermail/development/2020-April/039382.html [2] https://wiki.qt.io/QtCS2017_QQSG [3] https://wiki.qt.io/QtCS2018_Graphics_Vision_2020 [4] https://wiki.qt.io/Qt_Contributor_Summit_2019_-_QtGui_RHI_3D [5] https://lists.qt-project.org/pipermail/development/2019-April/035551.html [6] https://doc-snapshots.qt.io/qt5-5.15/qtquick-visualcanvas-scenegraph-renderer.html#rendering-via-the-qt-rendering-hardware-interface [7] https://www.qt.io/blog/qt-quick-on-vulkan-metal-direct3d [8] https://www.qt.io/blog/qt-quick-on-vulkan-metal-and-direct3d-part-2 [9] https://www.qt.io/blog/qt-quick-on-vulkan-metal-and-direct3d-part-3 [10] https://youtu.be/jH2gfeccpqY [11] https://github.com/alpqr/talks/blob/master/Qt_Graphics_Webinar_March_2020/qt_graphics_03_2020.pdf [12] https://www.qt.io/qtvirtualtechcon2020
_______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development