QQuickRenderControl? Offscreen (to texture) rendering? Not supported with the QRhi-based rendering path at the moment.
Key enabler for a number of use cases, such as:
- rendering Qt Quick content into textures, to be then used in a VR system
- the same, to be used by an external 3D engine
- reading back image data from the texture and saving to images or image sequences
- QQuickWidget (even if QQuickWidget is not supported in 6.0, it does not invalidate the need for QQuickRenderControl)
One interesting issue is QRhi being private. However, making a rendercontrol-based pipeline involves creating a QRhi instance on the application side (as there is no scenegraph render loop to do it for us). Then the question of the render target: cannot just pass in a QRhiTexture / QRhiTextureRenderTarget in the Qt Quick public API if those QRhi classes are not public.
- For 6.0 this will mean that that we will work with the typical void * native object input (so one can pass in a VkImage and a layout, or an ID3D11Texture2D, etc.), and that will be the alternative to the OpenGL-specific QQuickWindow::setRenderTarget(GLuint), This is then complemented by some helper functions that under the hood initialize a QRhi, like a built-in scenegraph render loop would do. This of course raises a number of issues to consider (importing existing device objects etc.)
- Once QRhi becomes at least semi-public, this debt can be addressed later on, by introducing proper QRhi* based APIs.
Ideally this should come with a set of new tests and examples, replacing the lonely old rendercontrol example. Needs examples for more than one graphics API. Also consider the image sequence use case described in https://www.qt.io/blog/2017/02/21/making-movies-qml as that may make a useful test or demo in some form.
|For Gerrit Dashboard: QTBUG-78595|
|286663,41||Allow redirecting QRhi-based rendering via QQuickRenderControl||dev||qt/qtdeclarative||Status: MERGED||+2||0|
|286713,4||WIP: Private APIs for QQuickRenderControl-on-QRhi||5.15||qt/qtdeclarative||Status: ABANDONED||-2||0|
|294725,1||Allow privately redirecting the RHI-based rendering||5.15||qt/qtdeclarative||Status: ABANDONED||-2||0|
|294726,5||Add autotest for QQuickRenderControl||5.15||qt/qtdeclarative||Status: MERGED||+2||0|
|294842,3||Move legacy rendercontrol example into a subdirectory||dev||qt/qtdeclarative||Status: MERGED||+2||0|
|294843,1||WIP: Add new setRenderTarget() alternative||dev||qt/qtdeclarative||Status: ABANDONED||-2||0|