aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl/glu-CustomJavaCode-gl2.java
diff options
context:
space:
mode:
Diffstat (limited to 'make/config/jogl/glu-CustomJavaCode-gl2.java')
-rw-r--r--make/config/jogl/glu-CustomJavaCode-gl2.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/make/config/jogl/glu-CustomJavaCode-gl2.java b/make/config/jogl/glu-CustomJavaCode-gl2.java
index 690e0acfa..3367b2f69 100644
--- a/make/config/jogl/glu-CustomJavaCode-gl2.java
+++ b/make/config/jogl/glu-CustomJavaCode-gl2.java
@@ -536,27 +536,18 @@ public final void gluEndCurve(GLUnurbs r) {
//
private static GLUgl2ProcAddressTable gluProcAddressTable;
-private static volatile boolean gluLibraryLoaded;
private static final GLUgl2ProcAddressTable getGLUProcAddressTable() {
- if (!gluLibraryLoaded) {
- loadGLULibrary();
- }
if (gluProcAddressTable == null) {
GLContext curContext = GLContext.getCurrent();
if (curContext == null) {
throw new GLException("No OpenGL context current on this thread");
}
+ GLDynamicLookupHelper glLookupHelper = ((GLDrawableImpl) curContext.getGLDrawable()).getGLDynamicLookupHelper();
+ glLookupHelper.loadGLULibrary();
GLUgl2ProcAddressTable tmp = new GLUgl2ProcAddressTable(new GLProcAddressResolver());
- tmp.reset(((GLDrawableImpl)curContext.getGLDrawable()).getDynamicLookupHelper());
+ tmp.reset(glLookupHelper);
gluProcAddressTable = tmp;
}
return gluProcAddressTable;
}
-
-private static final synchronized void loadGLULibrary() {
- if (!gluLibraryLoaded) {
- GLDrawableFactoryImpl.getFactoryImpl(null).loadGLULibrary();
- gluLibraryLoaded = true;
- }
-}