summaryrefslogtreecommitdiffstats
path: root/src/core/ozone/gl_context_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ozone/gl_context_qt.cpp')
-rw-r--r--src/core/ozone/gl_context_qt.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp
index 10347bdc7..e511e8eb5 100644
--- a/src/core/ozone/gl_context_qt.cpp
+++ b/src/core/ozone/gl_context_qt.cpp
@@ -123,7 +123,8 @@ void* GLContextHelper::getEGLConfig()
void* GLContextHelper::getGlXConfig()
{
- return resourceForContext(QByteArrayLiteral("glxconfig"));
+ QByteArray resource = QByteArrayLiteral("glxconfig");
+ return resourceForContext(resource);
}
void* GLContextHelper::getEGLDisplay()
@@ -172,6 +173,24 @@ QFunctionPointer GLContextHelper::getEglGetProcAddress()
return get_proc_address;
}
+void *GLContextHelper::getGlxPlatformInterface()
+{
+#if QT_CONFIG(opengl) && defined(USE_GLX)
+ if (QOpenGLContext *context = qt_gl_global_share_context())
+ return context->platformInterface<QPlatformInterface::QGLXContext>();
+#endif
+ return nullptr;
+}
+
+void *GLContextHelper::getEglPlatformInterface()
+{
+#if QT_CONFIG(opengl) && QT_CONFIG(egl)
+ if (QOpenGLContext *context = qt_gl_global_share_context())
+ return context->platformInterface<QPlatformInterface::QEGLContext>();
+#endif
+ return nullptr;
+}
+
bool GLContextHelper::isCreateContextRobustnessSupported()
{
return contextHelper->m_robustness;