summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames McDonnell <jmcdonnell@blackberry.com>2017-04-27 15:08:01 -0400
committerJani Heikkinen <jani.heikkinen@qt.io>2017-05-07 16:44:32 +0000
commitfb00b4199e69b91b22d32c5f7e07cc10ed4ec781 (patch)
treedce4f41880324a3049691fe20190fb427989ae8d /src
parent464a43d43c2bb2440d4ad745bc134e0dac10872c (diff)
OpenGL function lookup for QNX
Qt no longer supports using OpenGL ES2 via static linkage. Task-number: QTBUG-60457 Change-Id: I754ff1c084ecdfdf7bea0bd691c8f0fc47a2fcb0 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/qnx/qnx.pro2
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.cpp7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/platforms/qnx/qnx.pro b/src/plugins/platforms/qnx/qnx.pro
index 0b052adf0f..34be6d582e 100644
--- a/src/plugins/platforms/qnx/qnx.pro
+++ b/src/plugins/platforms/qnx/qnx.pro
@@ -78,7 +78,7 @@ qtConfig(opengles2) {
HEADERS += qqnxglcontext.h \
qqnxeglwindow.h
- QMAKE_USE += egl
+ QMAKE_USE += opengl_es2 egl
}
CONFIG(qqnx_pps) {
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp
index 0d3076a743..d35a4f0bba 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.cpp
+++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp
@@ -47,6 +47,8 @@
#include <QtGui/QOpenGLContext>
#include <QtGui/QScreen>
+#include <dlfcn.h>
+
#if defined(QQNXGLCONTEXT_DEBUG)
#define qGLContextDebug qDebug
#else
@@ -262,7 +264,10 @@ QFunctionPointer QQnxGLContext::getProcAddress(const char *procName)
qFatal("QQNX: failed to set EGL API, err=%d", eglGetError());
// Lookup EGL extension function pointer
- return static_cast<QFunctionPointer>(eglGetProcAddress(procName));
+ QFunctionPointer result = static_cast<QFunctionPointer>(eglGetProcAddress(procName));
+ if (!result)
+ result = reinterpret_cast<QFunctionPointer>(dlsym(RTLD_DEFAULT, procName));
+ return result;
}
bool QQnxGLContext::isSharing() const