From fb8b3e1bee867c86bbb848d2c3947e78f9d0e07e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 15 Jun 2015 10:52:14 +0200 Subject: Fix GLX backend in static builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not attempt to resolve dynamically in static builds. This is not wrong, but if the GL library is statically linked just like the rest of Qt, it won't work. Therefore just call the function directly in static builds, it should be no problem on modern systems. Task-number: QTBUG-46499 Change-Id: I35fd7c3b5b180d753becbb57377b27dd1a8747ad Reviewed-by: Andy Shaw Reviewed-by: Jørgen Lind --- src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp index 5166372364..8b14fc7d70 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp @@ -540,6 +540,9 @@ void QGLXContext::swapBuffers(QPlatformSurface *surface) void (*QGLXContext::getProcAddress(const QByteArray &procName)) () { +#ifdef QT_STATIC + return glXGetProcAddressARB(reinterpret_cast(procName.constData())); +#else typedef void *(*qt_glXGetProcAddressARB)(const GLubyte *); static qt_glXGetProcAddressARB glXGetProcAddressARB = 0; static bool resolved = false; @@ -569,6 +572,7 @@ void (*QGLXContext::getProcAddress(const QByteArray &procName)) () if (!glXGetProcAddressARB) return 0; return (void (*)())glXGetProcAddressARB(reinterpret_cast(procName.constData())); +#endif } QSurfaceFormat QGLXContext::format() const -- cgit v1.2.3