aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/impl/NativeLibLoader.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-07-19 01:53:36 +0000
committerKenneth Russel <[email protected]>2005-07-19 01:53:36 +0000
commit74adb7cc4ba59369964b562e3c84988f63025296 (patch)
tree0a850c1110afa161eeadb930c4035eb310b79f84 /src/net/java/games/jogl/impl/NativeLibLoader.java
parentb01ac27a7d6ae4863490537e1ba8749795cd84de (diff)
Added workaround for problem loading JAWT library on X11 platforms
before the AWT toolkit had been loaded. Added check for jogl.gljpanel.nosw system property to diagnose problems with pbuffer support. Fixed bootstrapping problem with GLX where its function pointer table needed to be initialized before the first OpenGL context was created in the case where a pbuffer was the first thing created. Moved helper functions for resetting proc address table and dynamic function lookup to GLDrawableFactoryImpl from GLContextImpl. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JSR-231@331 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/impl/NativeLibLoader.java')
-rw-r--r--src/net/java/games/jogl/impl/NativeLibLoader.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net/java/games/jogl/impl/NativeLibLoader.java b/src/net/java/games/jogl/impl/NativeLibLoader.java
index 54d37f6ce..31fec96a2 100644
--- a/src/net/java/games/jogl/impl/NativeLibLoader.java
+++ b/src/net/java/games/jogl/impl/NativeLibLoader.java
@@ -39,6 +39,7 @@
package net.java.games.jogl.impl;
+import java.awt.Toolkit;
import java.security.*;
public class NativeLibLoader {
@@ -60,6 +61,10 @@ public class NativeLibLoader {
boolean isOSX = System.getProperty("os.name").equals("Mac OS X");
if (!isOSX) {
try {
+ // On X11 systems, toolkit must be loaded before
+ // trying to resolve JAWT in order for libmawt.so to
+ // be found properly
+ Toolkit.getDefaultToolkit();
System.loadLibrary("jawt");
} catch (UnsatisfiedLinkError e) {
// Accessibility technologies load JAWT themselves; safe to continue