From fb00b4199e69b91b22d32c5f7e07cc10ed4ec781 Mon Sep 17 00:00:00 2001 From: James McDonnell Date: Thu, 27 Apr 2017 15:08:01 -0400 Subject: 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 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/qnx/qnx.pro | 2 +- src/plugins/platforms/qnx/qqnxglcontext.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/qnx') 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 #include +#include + #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(eglGetProcAddress(procName)); + QFunctionPointer result = static_cast(eglGetProcAddress(procName)); + if (!result) + result = reinterpret_cast(dlsym(RTLD_DEFAULT, procName)); + return result; } bool QQnxGLContext::isSharing() const -- cgit v1.2.3