diff options
Diffstat (limited to 'src/net/java/games/jogl/impl')
-rw-r--r-- | src/net/java/games/jogl/impl/GLContext.java | 6 | ||||
-rw-r--r-- | src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/net/java/games/jogl/impl/GLContext.java b/src/net/java/games/jogl/impl/GLContext.java index 318ff24a2..e2f591278 100644 --- a/src/net/java/games/jogl/impl/GLContext.java +++ b/src/net/java/games/jogl/impl/GLContext.java @@ -484,6 +484,12 @@ public abstract class GLContext { * the definition of "available". */ protected void resetGLFunctionAvailability() { + // In order to be able to allow the user to uniformly install the + // debug and trace pipelines in their GLEventListener.init() + // method (for both GLCanvas and GLJPanel), we need to reset the + // actual GL object in the GLDrawable as well + setGL(createGL()); + functionAvailability.flush(); if (!haveResetGLUProcAddressTable) { if (DEBUG) { diff --git a/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java b/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java index f0ce74d9d..b0a164f26 100644 --- a/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java +++ b/src/net/java/games/jogl/impl/windows/WindowsPbufferGLContext.java @@ -432,7 +432,10 @@ public class WindowsPbufferGLContext extends WindowsGLContext { if (hglrc != 0) { super.destroyImpl(); // Must release DC and pbuffer - GL gl = getGL(); + // NOTE that since the context is not current, glGetError() can + // not be called here, so we skip the use of any composable + // pipelines + GL gl = createGL(); if (gl.wglReleasePbufferDCARB(buffer, hdc) == 0) { throw new GLException("Error releasing pbuffer device context: error code " + WGL.GetLastError()); } |