summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2016-02-02 12:50:33 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-03-01 14:46:26 +0000
commit5e9a5246fb688a33ff27bed010226595f579f23d (patch)
treebfa49687f2bb6a91d04605e42377d4fdbd54bf12 /src/platformsupport/eglconvenience/qeglplatformcontext.cpp
parentc69622fc60db8a3dc6755eda4136d01456a3785c (diff)
Ensure we can query all GL functions in all platform plugins
This is required to simplify our code in the opengl classes and makes it possible to remove OS dependent code paths in Qt Gui. Change-Id: Ice09440840c86b2d6ac8d3955d273846695338d4 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglplatformcontext.cpp')
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index e4cfb86ab3..bd7254b73a 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -48,6 +48,9 @@
#ifdef Q_OS_ANDROID
#include <QtCore/private/qjnihelpers_p.h>
#endif
+#ifndef Q_OS_WIN
+#include <dlfcn.h>
+#endif
QT_BEGIN_NAMESPACE
@@ -443,7 +446,12 @@ void QEGLPlatformContext::swapBuffers(QPlatformSurface *surface)
QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
{
eglBindAPI(m_api);
- return eglGetProcAddress(procName);
+ QFunctionPointer proc = (QFunctionPointer) eglGetProcAddress(procName);
+#ifndef Q_OS_WIN
+ if (!proc)
+ proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName);
+#endif
+ return proc;
}
QSurfaceFormat QEGLPlatformContext::format() const