summaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-04-02 23:44:40 +0000
committerKenneth Russel <[email protected]>2006-04-02 23:44:40 +0000
commitd6ee9155105cb90a388cd6c9474ec43261541a1c (patch)
treebe0d31bc9af4e1781e0a4ff968d897184062213a /src/classes/com/sun
parent4bf265296928bef22f43aca60f7789ff2b129bd8 (diff)
Replaced absolute path to libGL.so.1 with relative path to presumably
fix problems with ATI's fglrx drivers, which use a libGL.so.1.2 placed in a nonstandard location git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@698 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun')
-rw-r--r--src/classes/com/sun/opengl/impl/x11/DRIHack.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/DRIHack.java b/src/classes/com/sun/opengl/impl/x11/DRIHack.java
index 40b7d1950..18bf3d5e8 100644
--- a/src/classes/com/sun/opengl/impl/x11/DRIHack.java
+++ b/src/classes/com/sun/opengl/impl/x11/DRIHack.java
@@ -103,7 +103,23 @@ public class DRIHack {
}
NativeLibLoader.loadDRIHack();
- libGLHandle = dlopen("/usr/lib/libGL.so.1");
+ // Try a few different variants for best robustness
+ // In theory probably only the first is necessary
+ libGLHandle = dlopen("libGL.so.1");
+ if (DEBUG && libGLHandle != 0) System.err.println(" Found libGL.so.1");
+ if (libGLHandle == 0) {
+ libGLHandle = dlopen("libGL.so.1.2");
+ if (DEBUG && libGLHandle != 0) System.err.println(" Found libGL.so.1.2");
+ }
+ // Allow ATI's fglrx to supersede version in /usr/lib
+ if (libGLHandle == 0) {
+ libGLHandle = dlopen("/usr/lib/ati-fglrx/libGL.so.1.2");
+ if (DEBUG && libGLHandle != 0) System.err.println(" Found /usr/lib/ati-fglrx/libGL.so.1.2");
+ }
+ if (libGLHandle == 0) {
+ libGLHandle = dlopen("/usr/lib/libGL.so.1");
+ if (DEBUG && libGLHandle != 0) System.err.println(" Found /usr/lib/libGL.so.1");
+ }
}
}