aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/NativeLibLoader.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/NativeLibLoader.java')
-rw-r--r--src/classes/com/sun/opengl/impl/NativeLibLoader.java19
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;
+ }
+ }
+ }
+ }
}