summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhi.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-09-16 13:07:20 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2021-09-16 17:04:35 +0200
commitd55a6891d18ee576a6f3e2c510eefee4a1639d7f (patch)
treeb6af4d1865456d6d8af8f8bcbb14d14f53a95baa /src/gui/rhi/qrhi.cpp
parent10eedd175e99a8be191d116d5c81c340d6c3c5b6 (diff)
rhi: gl: Have a way to state GL_TEXTURE_RECTANGLE is wanted
Added specifically to support the deprecated CVOpenGLTextureCache on macOS, because Qt Multimedia still needs a way to use that when the applications requests using OpenGL instead of Metal. Follow what we did for GL_TEXTURE_EXTERNAL_OES, and add a flag that simply makes all our glBindTexture calls use the GL_TEXTURE_RECTANGLE[_ARB] target. Pick-to: 6.2 Change-Id: If818b13a9f520cdb8bdc16de84a3ca0e18ad6c33 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi.cpp')
-rw-r--r--src/gui/rhi/qrhi.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp
index f4855cd046..7c1e3811b1 100644
--- a/src/gui/rhi/qrhi.cpp
+++ b/src/gui/rhi/qrhi.cpp
@@ -2444,6 +2444,13 @@ bool QRhiRenderBuffer::createFrom(NativeRenderBuffer src)
render target's color attachment refers to a slice in range [0..depth-1].
The underlying graphics API may not support 3D textures at run time.
Support is indicated by the QRhi::ThreeDimensionalTextures feature.
+
+ \value TextureRectangleGL The texture should use the GL_TEXTURE_RECTANGLE
+ target with OpenGL. This flag is ignored with other graphics APIs. Just
+ like ExternalOES, this flag is useful when working with platform APIs where
+ native OpenGL texture objects received from the platform are wrapped in a
+ QRhiTexture, and the platform can only provide textures for a non-2D
+ texture target.
*/
/*!