summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
authorLaszlo Agocs <[email protected]>2023-06-19 11:56:48 +0200
committerLaszlo Agocs <[email protected]>2023-06-22 15:20:26 +0200
commitf9d90c6fbab1d4f66dcc3fbc06f7f157693d04d1 (patch)
treea51ead7381684a8cb484b229f162241c0481c4ad /src/gui/opengl
parent2b9ef2eb44c084d39ef8324cfe1ae42a98b3038f (diff)
rhi: Introduce multiview starting with OpenGL (ES)
Fixes: QTBUG-114770 Change-Id: Ibb1ced7f19d15a5116c60e95fd3e6b86ace63155 Reviewed-by: Andy Nichols <[email protected]>
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopenglextensions_p.h4
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp4
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/opengl/qopenglextensions_p.h b/src/gui/opengl/qopenglextensions_p.h
index fdb9b51f067..58231545c6b 100644
--- a/src/gui/opengl/qopenglextensions_p.h
+++ b/src/gui/opengl/qopenglextensions_p.h
@@ -59,7 +59,9 @@ public:
StandardDerivatives = 0x02000000,
ASTCTextureCompression = 0x04000000,
ETC2TextureCompression = 0x08000000,
- HalfFloatVertex = 0x10000000
+ HalfFloatVertex = 0x10000000,
+ MultiView = 0x20000000,
+ MultiViewExtended = 0x40000000
};
Q_DECLARE_FLAGS(OpenGLExtensions, OpenGLExtension)
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index ee769875667..0b760eb2dd1 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -348,6 +348,10 @@ static int qt_gl_resolve_extensions()
extensions |= QOpenGLExtensions::StandardDerivatives;
if (extensionMatcher.match("GL_ARB_half_float_vertex"))
extensions |= QOpenGLExtensions::HalfFloatVertex;
+ if (extensionMatcher.match("GL_OVR_multiview"))
+ extensions |= QOpenGLExtensions::MultiView;
+ if (extensionMatcher.match("GL_OVR_multiview2"))
+ extensions |= QOpenGLExtensions::MultiViewExtended;
if (ctx->isOpenGLES()) {
if (format.majorVersion() >= 2)