summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp')
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
index 439acc00c..33ae2e038 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
@@ -45,6 +45,8 @@
#include <QRegion>
+#include <dlfcn.h>
+
QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
@@ -94,9 +96,12 @@ void QWaylandXCompositeGLXContext::swapBuffers(QPlatformSurface *surface)
w->waitForFrameSync();
}
-void (*QWaylandXCompositeGLXContext::getProcAddress(const char *procName)) ()
+QFunctionPointer QWaylandXCompositeGLXContext::getProcAddress(const char *procName)
{
- return glXGetProcAddress(reinterpret_cast<const GLubyte *>(procName));
+ QFunctionPointer proc = glXGetProcAddress(reinterpret_cast<const GLubyte *>(procName));
+ if (!proc)
+ proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName);
+ return proc;
}
QSurfaceFormat QWaylandXCompositeGLXContext::format() const