summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-05-19 08:57:59 +0200
committerLiang Qi <liang.qi@qt.io>2017-05-19 08:57:59 +0200
commit550e16b8141caf8d6c0614a423a295b0aea9cab1 (patch)
tree1495e6a9808d1140142a2cf46c6e36cba95f8890 /src/plugins/platforms
parent087b4fc6cd3a68db6ac4c3a7f43c03aa6e73c088 (diff)
parent9954187adba4d26a1b1aa93874993f15d6d8a0b9 (diff)
Merge remote-tracking branch 'origin/5.9.0' into 5.9
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/qnx/qnx.pro2
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.cpp7
-rw-r--r--src/plugins/platforms/windows/windows.pri11
3 files changed, 16 insertions, 4 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
diff --git a/src/plugins/platforms/windows/windows.pri b/src/plugins/platforms/windows/windows.pri
index 7d3ecc8aa2..73677311f5 100644
--- a/src/plugins/platforms/windows/windows.pri
+++ b/src/plugins/platforms/windows/windows.pri
@@ -1,6 +1,8 @@
# Note: OpenGL32 must precede Gdi32 as it overwrites some functions.
LIBS += -lole32 -luser32 -lwinspool -limm32 -lwinmm -loleaut32
+QT_FOR_CONFIG += gui
+
qtConfig(opengl):!qtConfig(opengles2):!qtConfig(dynamicgl): LIBS *= -lopengl32
mingw: LIBS *= -luuid
@@ -99,5 +101,10 @@ RESOURCES += $$PWD/openglblacklists.qrc
qtConfig(accessibility): include($$PWD/accessible/accessible.pri)
-DEFINES *= LIBEGL_NAME=$${LIBQTANGLE_NAME}
-DEFINES *= LIBGLESV2_NAME=$${LIBQTANGLE_NAME}
+qtConfig(combined-angle-lib) {
+ DEFINES *= LIBEGL_NAME=$${LIBQTANGLE_NAME}
+ DEFINES *= LIBGLESV2_NAME=$${LIBQTANGLE_NAME}
+} else {
+ DEFINES *= LIBEGL_NAME=$${LIBEGL_NAME}
+ DEFINES *= LIBGLESV2_NAME=$${LIBGLESV2_NAME}
+}