From e346b9524c12c988ba5b95a4bc39d23fd2620cf2 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 10 Sep 2021 21:03:34 +0200 Subject: Expose the config and display for EGL-based QOpenGLContexts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...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ø --- src/gui/platform/unix/qunixnativeinterface.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/gui/platform/unix/qunixnativeinterface.cpp') 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); -- cgit v1.2.3