summaryrefslogtreecommitdiffstats
path: root/src/render/texture/qabstracttexture.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2022-08-10 10:25:12 +0200
committerPaul Lemire <paul.lemire@kdab.com>2022-08-11 06:57:04 +0200
commitbed3d7b000a0ce84523fa79ab29731716bb8ed3b (patch)
treef591397792af349840ab30e5878906128bd13f49 /src/render/texture/qabstracttexture.h
parentde14c77db216577d497519e6937c386927495a83 (diff)
RHI backend: set texture handle on the frontend node
Allows to then use the handle with a 3rd party external renderer (e.g QtQuick with QQuickWindowPrivate::createTextureFromNativeTexture). Note: we need to be careful and only set the handles once we know the internal QRhiTextures aren't modified anymore. This means we can only do it after having created/updated the textures and the render targets as the render target creation might result in some QRhiTextures being recreated. Pick-to: 6.4 Change-Id: I7e85fd2661cf935368ee55dc2ebd240bbda38a6f Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'src/render/texture/qabstracttexture.h')
-rw-r--r--src/render/texture/qabstracttexture.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/texture/qabstracttexture.h b/src/render/texture/qabstracttexture.h
index afe8abaf6..9fc55fa7f 100644
--- a/src/render/texture/qabstracttexture.h
+++ b/src/render/texture/qabstracttexture.h
@@ -237,7 +237,8 @@ public:
enum HandleType {
NoHandle,
- OpenGLTextureId
+ OpenGLTextureId,
+ RHITextureId
};
Q_ENUM(HandleType) // LCOV_EXCL_LINE