summaryrefslogtreecommitdiffstats
path: root/make/glu-CustomJavaCode.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2006-02-10 20:06:04 +0000
committerKenneth Russel <[email protected]>2006-02-10 20:06:04 +0000
commit4b14f14cbb84c3d60d3fb501d78873c574eec6bd (patch)
tree2bac953157778f18e0eff06c4c01fe08e55d9076 /make/glu-CustomJavaCode.java
parentc6ed1767abe191648219a403828ecf32ad5ad25e (diff)
Made loading of GLU library lazier, partially in the hope that this
may address problems on certain Linux distributions where for some reason we're falling back to software rendering with Mesa git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@595 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/glu-CustomJavaCode.java')
-rw-r--r--make/glu-CustomJavaCode.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/make/glu-CustomJavaCode.java b/make/glu-CustomJavaCode.java
index ffa3a0242..1ea4f20b9 100644
--- a/make/glu-CustomJavaCode.java
+++ b/make/glu-CustomJavaCode.java
@@ -1432,8 +1432,12 @@ public int gluScaleImage(int format, int wIn, int hIn, int typeIn, java.nio.Buff
//
private static GLUProcAddressTable gluProcAddressTable;
+private static volatile boolean gluLibraryLoaded;
private static GLUProcAddressTable getGLUProcAddressTable() {
+ if (!gluLibraryLoaded) {
+ loadGLULibrary();
+ }
if (gluProcAddressTable == null) {
GLUProcAddressTable tmp = new GLUProcAddressTable();
ProcAddressHelper.resetProcAddressTable(tmp, GLDrawableFactoryImpl.getFactoryImpl());
@@ -1441,3 +1445,10 @@ private static GLUProcAddressTable getGLUProcAddressTable() {
}
return gluProcAddressTable;
}
+
+private static synchronized void loadGLULibrary() {
+ if (!gluLibraryLoaded) {
+ GLDrawableFactoryImpl.getFactoryImpl().loadGLULibrary();
+ gluLibraryLoaded = true;
+ }
+}