Qt Quick's ability to interoperate with custom, native graphics rendering code (Vulkan, Metal, D3D11, OpenGL) should be on part with what we offer when Qt Quick is using OpenGL directly. Losing functionality is only acceptable in cases that are accepted to be rarely used and/or seen as an outdated approach.
QTBUG-78569 handles already a big part of the problem, by adding QQuickWindow::createTextureFromNativeObject(), implementing QSGRenderNode for the RHI code path as well, and shipping with examples like vulkanunderqml, metalunderqml and metaltextureimport.
This is not quite sufficient yet however. At minimum the following item must have a solution in Qt 6.0 at latest:
- What's the alternative to QSGTexture::textureId()? The QRhiTexture is available but private API so exposing that is not a solution. The opposite API (QQuickWindow::createTextureFromNativeObject()) is now added, so perhaps QSGTexture just needs a similar getter for a void *nativeObject + int nativeLayout.
[The rest of this list is now moved into separate tasks: QTBUG-80499 , QTBUG-80500, and QTBUG-80501]
|For Gerrit Dashboard: QTBUG-78570|
|283173,13||RHI: new native texture API||5.15||qt/qtbase||Status: MERGED||+2||0|
|283174,7||Add API to get the platform specific texture handle||5.15||qt/qtdeclarative||Status: MERGED||+2||0|
|284903,3||RHI: Remove old native texture API||5.15||qt/qtbase||Status: MERGED||+2||0|