diff options
author | Kenneth Russel <[email protected]> | 2004-11-18 23:17:23 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2004-11-18 23:17:23 +0000 |
commit | e088362d49d9c64fa3c862d7a3cd6f07485985eb (patch) | |
tree | ac193b82a54769c5c28dd7fc808c25ec0e5e8bc8 /src/net/java/games/jogl/impl/GLContext.java | |
parent | 0f4826aff7b84698df7c465782c81102a6160a30 (diff) |
Partial fix for Issue 42: Problems invoking GLU functions
Incorporated the LWJGL team's port of the GLU quadric and projection
routines to be able to eliminate calls to the native GLU library for
these cases, which was problematic on certain Linux distributions.
Still need to port at least some of the mipmap routines and the NURBS
tesselator.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@172 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/impl/GLContext.java')
-rw-r--r-- | src/net/java/games/jogl/impl/GLContext.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/net/java/games/jogl/impl/GLContext.java b/src/net/java/games/jogl/impl/GLContext.java index 443d009dc..2aa8e9640 100644 --- a/src/net/java/games/jogl/impl/GLContext.java +++ b/src/net/java/games/jogl/impl/GLContext.java @@ -67,13 +67,9 @@ public abstract class GLContext { protected GLCapabilities capabilities; protected GLCapabilitiesChooser chooser; protected GL gl; - // All GLU interfaces eventually route calls down to gluRoot. It can be - // static because GLU it doesn't actually need to own context, it just makes - // GL calls and assumes some context is active. protected static final GLUProcAddressTable gluProcAddressTable = new GLUProcAddressTable(); - protected static final GLU gluRoot = new GLUImpl(gluProcAddressTable); protected static boolean haveResetGLUProcAddressTable; - protected GLU glu = gluRoot; // this is the context's GLU interface + protected GLU glu = new GLUImpl(gluProcAddressTable); protected Thread renderingThread; protected Runnable deferredReshapeAction; // Support for OpenGL context destruction and recreation in the face @@ -155,7 +151,7 @@ public abstract class GLContext { throw new GLException(e); } this.chooser = chooser; - gl = createGL(); + setGL(createGL()); functionAvailability = new FunctionAvailabilityCache(this); if (shareWith != null) { GLContextShareSet.registerSharing(this, shareWith); @@ -374,6 +370,8 @@ public abstract class GLContext { public void setGL(GL gl) { this.gl = gl; + // Also reset the GL object for the pure-Java GLU implementation + ((GLUImpl) glu).setGL(gl); } public GLU getGLU() { |