summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5/5.4/qtbase/dlopen-gl.patch
blob: d5c4c2b97cb6099a083cf453ec5d3c1cf99ad43a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: qt-everywhere-opensource-src-5.4.2/qtbase/src/plugins/platforms/xcb/qglxintegration.cpp
===================================================================
--- qt-everywhere-opensource-src-5.4.2.orig/qtbase/src/plugins/platforms/xcb/qglxintegration.cpp
+++ qt-everywhere-opensource-src-5.4.2/qtbase/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -560,7 +560,12 @@ void (*QGLXContext::getProcAddress(const
             {
                 extern const QString qt_gl_library_name();
 //                QLibrary lib(qt_gl_library_name());
+                // Check system library paths first
                 QLibrary lib(QLatin1String("GL"));
+                if (!lib.load()) {
+                    // Fallback to Mesa driver
+                    lib.setFileName(QLatin1String("@mesa_lib@/lib/libGL"));
+                }
                 glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.resolve("glXGetProcAddressARB");
             }
         }