aboutsummaryrefslogtreecommitdiffstats
path: root/make/glu-CustomJavaCode.java
diff options
context:
space:
mode:
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;
+ }
+}