summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-03-14 17:22:22 +0100
committerSven Gothel <[email protected]>2013-03-14 17:22:22 +0100
commit538a41849192cc09da36eeaa5fa9ae10973d85b7 (patch)
treea9c13d13849bdb78d3f13e2a6fa1b9980a9c0021 /src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
parentdd705f1eb14b87b207e375ea0d71e00155a9933f (diff)
Fix NEWT WindowImpl reparent-recreate w/ GLEventListenerState: Bug introduced w/ commit e2506d7663b752f00f0a98f793ebad52e65bd1e3
In case a reparent action takes place w/ recreate, only preserve the GLEventListenerState if the window is valid and will become visible again (wasVisible). Also add proper DEBUG log prefix to GLEventListenerState.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
index e6652cfac..592607819 100644
--- a/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
+++ b/src/jogl/classes/jogamp/opengl/GLAutoDrawableBase.java
@@ -109,6 +109,9 @@ public abstract class GLAutoDrawableBase implements GLAutoDrawable, FPSCounter {
* {@link #pullGLEventListenerState() pull} to preserve the {@link GLEventListenerState}.
*/
public final void setPreserveGLStateAtDestroy(boolean value) {
+ if( DEBUG ) {
+ System.err.println("GLAutoDrawableBase.setPreserveGLStateAtDestroy: ("+Thread.currentThread().getName()+"): "+preserveGLELSAtDestroy+" -> "+value+" - surfaceHandle 0x"+Long.toHexString(getNativeSurface().getSurfaceHandle()));
+ }
preserveGLELSAtDestroy = value;
}
@@ -283,7 +286,7 @@ public abstract class GLAutoDrawableBase implements GLAutoDrawable, FPSCounter {
*/
protected void destroyImplInLock() {
if( preserveGLELSAtDestroy ) {
- preserveGLELSAtDestroy = false;
+ setPreserveGLStateAtDestroy(false);
pullGLEventListenerState();
}
if( null != context ) {