summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2017-03-01 15:47:21 +0100
committerPaul Olav Tvete <paul.tvete@qt.io>2017-03-01 15:48:39 +0100
commita259232f3a661b8916497b056cb3d50c396c3d94 (patch)
tree0e73cb46bc78ece0db7e02cd5323018def74e09b /src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
parent852610be9406a46997b5e22e0988e840e8673bf0 (diff)
parent7d527c1914710a511c06713bbda1572b767cea34 (diff)
Merge remote-tracking branch 'qt/5.8' into 5.9
Diffstat (limited to 'src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp')
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index f70c75a33..2a9e39ed6 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -59,6 +59,8 @@
#include <QtCore/qmutex.h>
+#include <dlfcn.h>
+
// Constants from EGL_KHR_create_context
#ifndef EGL_CONTEXT_MINOR_VERSION_KHR
#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
@@ -575,9 +577,12 @@ bool QWaylandGLContext::isValid() const
return m_context != EGL_NO_CONTEXT;
}
-void (*QWaylandGLContext::getProcAddress(const char *procName)) ()
+QFunctionPointer QWaylandGLContext::getProcAddress(const char *procName)
{
- return eglGetProcAddress(procName);
+ QFunctionPointer proc = (QFunctionPointer) eglGetProcAddress(procName);
+ if (!proc)
+ proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName);
+ return proc;
}
EGLConfig QWaylandGLContext::eglConfig() const