From 74adb7cc4ba59369964b562e3c84988f63025296 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 19 Jul 2005 01:53:36 +0000 Subject: 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 --- src/net/java/games/jogl/impl/NativeLibLoader.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/net/java/games/jogl/impl/NativeLibLoader.java') 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 -- cgit v1.2.3