summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qopenglcontext_platform.h3
-rw-r--r--src/gui/opengl/platform/egl/qeglplatformcontext_p.h2
-rw-r--r--src/gui/platform/unix/qunixnativeinterface.cpp12
3 files changed, 17 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
diff --git a/src/gui/opengl/platform/egl/qeglplatformcontext_p.h b/src/gui/opengl/platform/egl/qeglplatformcontext_p.h
index 5f399c69946..6bddd18108b 100644
--- a/src/gui/opengl/platform/egl/qeglplatformcontext_p.h
+++ b/src/gui/opengl/platform/egl/qeglplatformcontext_p.h
@@ -108,6 +108,8 @@ public:
bool isValid() const override { return m_eglContext != EGL_NO_CONTEXT; }
EGLContext nativeContext() const override { return eglContext(); }
+ EGLConfig config() const override { return eglConfig(); }
+ EGLDisplay display() const override { return eglDisplay(); }
EGLContext eglContext() const;
EGLDisplay eglDisplay() const;
diff --git a/src/gui/platform/unix/qunixnativeinterface.cpp b/src/gui/platform/unix/qunixnativeinterface.cpp
index c4a3ad37d30..6cd8de6e9a3 100644
--- a/src/gui/platform/unix/qunixnativeinterface.cpp
+++ b/src/gui/platform/unix/qunixnativeinterface.cpp
@@ -143,6 +143,18 @@ QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext visualBased
\return the underlying EGLContext.
*/
+/*!
+ \fn EGLConfig QNativeInterface::QEGLContext::config() const
+ \since 6.3
+ \return the EGLConfig associated with the underlying EGLContext.
+*/
+
+/*!
+ \fn EGLDisplay QNativeInterface::QEGLContext::display() const
+ \since 6.3
+ \return the EGLDisplay associated with the underlying EGLContext.
+*/
+
QT_DEFINE_NATIVE_INTERFACE(QEGLContext);
QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QEGLIntegration);