diff options
Diffstat (limited to 'src/platformsupport/eglconvenience')
-rw-r--r-- | src/platformsupport/eglconvenience/eglconvenience.pri | 2 | ||||
-rw-r--r-- | src/platformsupport/eglconvenience/qeglplatformcontext.cpp | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri index f1e0d58a6d..fe6d0eb748 100644 --- a/src/platformsupport/eglconvenience/eglconvenience.pri +++ b/src/platformsupport/eglconvenience/eglconvenience.pri @@ -26,4 +26,6 @@ contains(QT_CONFIG,egl) { LIBS_PRIVATE += $$QMAKE_LIBS_X11 } CONFIG += egl + + LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD } 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 |