summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-06-15 10:52:14 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-06-16 12:04:35 +0000
commitfb8b3e1bee867c86bbb848d2c3947e78f9d0e07e (patch)
tree98c5ea3c99379e5f9fb02e44842eaddf62d78653 /src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
parent0ce2edc56a92f1040d1e9b88bf9fb1fe237a48ab (diff)
Fix GLX backend in static builds
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 <andy.shaw@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp')
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp4
1 files changed, 4 insertions, 0 deletions
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<const GLubyte *>(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<const GLubyte *>(procName.constData()));
+#endif
}
QSurfaceFormat QGLXContext::format() const