From 5e9a5246fb688a33ff27bed010226595f579f23d Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 2 Feb 2016 12:50:33 +0100 Subject: 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 --- src/platformsupport/eglconvenience/qeglplatformcontext.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/platformsupport/eglconvenience/qeglplatformcontext.cpp') 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 #endif +#ifndef Q_OS_WIN +#include +#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 -- cgit v1.2.3