diff options
author | Kenneth Russel <[email protected]> | 2006-02-16 02:49:30 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-02-16 02:49:30 +0000 |
commit | 945e2ae3d234815b43f83049c9d597cb61585797 (patch) | |
tree | e5967c06c09bddd9068e0807573da34d6dfa2fa0 /src/classes/com/sun/opengl/impl/NativeLibLoader.java | |
parent | f50877b19f5a3cb4deb1b26395ce357f3ebfd3f0 (diff) |
Fixed problems with lack of hardware acceleration on Linux
distributions using DRI drivers. Hacked around limitations of the
current DRI implementation by manually dlopen'ing libGL.so.1; avoids
changing glue code generation for core OpenGL 1.1 routines which do
not otherwise need to be called through function pointers on any
platform.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@614 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl/NativeLibLoader.java')
-rw-r--r-- | src/classes/com/sun/opengl/impl/NativeLibLoader.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/impl/NativeLibLoader.java b/src/classes/com/sun/opengl/impl/NativeLibLoader.java index 1a3d5c277..9331b2f72 100644 --- a/src/classes/com/sun/opengl/impl/NativeLibLoader.java +++ b/src/classes/com/sun/opengl/impl/NativeLibLoader.java @@ -55,6 +55,7 @@ public class NativeLibLoader { private static volatile boolean loadedCore = false; private static volatile boolean loadedAWTImpl = false; + private static volatile boolean loadedDRIHack = false; public static void loadCore() { if (doLoading && !loadedCore) { @@ -104,4 +105,22 @@ public class NativeLibLoader { } } } + + // See DRIHack.java in com/sun/opengl/impl/x11/ for description of + // why this is needed + public static void loadDRIHack() { + if (doLoading && !loadedDRIHack) { + synchronized (NativeLibLoader.class) { + if (!loadedDRIHack) { + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + System.loadLibrary("jogl_drihack"); + return null; + } + }); + loadedDRIHack = true; + } + } + } + } } |