summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qopenglcontext_platform.h
diff options
context:
space:
mode:
authorLaszlo Agocs <[email protected]>2021-09-10 21:03:34 +0200
committerLaszlo Agocs <[email protected]>2021-09-13 18:31:56 +0200
commite346b9524c12c988ba5b95a4bc39d23fd2620cf2 (patch)
tree387550f0560f5d53e8eddd93789ee1968bd92bc3 /src/gui/kernel/qopenglcontext_platform.h
parent7c1230d9a80bea444d560c44b7a9e0d1fbea44e8 (diff)
Expose the config and display for EGL-based QOpenGLContexts
...in the native interface. Using OpenXR is impossible on some platforms (for example, Android) without knowing all three. The EGLContext alone is not enough, and EGL offers no way to query the EGLConfig a context was created with. https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_KHR_opengl_es_enable Therefore, expose all three so libs/apps can use the new way to query these native resource without resorting to the old-style nativeResourceFor* queries. Change-Id: I7efb0a26b858150da55e711752af99426e744322 Reviewed-by: Tor Arne Vestbø <[email protected]>
Diffstat (limited to 'src/gui/kernel/qopenglcontext_platform.h')
-rw-r--r--src/gui/kernel/qopenglcontext_platform.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext_platform.h b/src/gui/kernel/qopenglcontext_platform.h
index 7627e34c202..efe219c0551 100644
--- a/src/gui/kernel/qopenglcontext_platform.h
+++ b/src/gui/kernel/qopenglcontext_platform.h
@@ -58,6 +58,7 @@ struct __GLXcontextRec; typedef struct __GLXcontextRec *GLXContext;
#if QT_CONFIG(egl)
typedef void *EGLContext;
typedef void *EGLDisplay;
+typedef void *EGLConfig;
#endif
#if !defined(Q_OS_MACOS) && defined(Q_CLANG_QDOC)
@@ -103,6 +104,8 @@ struct Q_GUI_EXPORT QEGLContext
QT_DECLARE_NATIVE_INTERFACE(QEGLContext, 1, QOpenGLContext)
static QOpenGLContext *fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext = nullptr);
virtual EGLContext nativeContext() const = 0;
+ virtual EGLConfig config() const = 0;
+ virtual EGLDisplay display() const = 0;
};
#endif