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>
This commit is contained in:
parent
0ce2edc56a
commit
fb8b3e1bee
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user