aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index ce50d95dd..33f136460 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -421,6 +421,11 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind
protected class GLLifecycleHook implements WindowImpl.LifecycleHook {
@Override
+ public void setPreserveResourcesAtDestroy() {
+ GLWindow.this.setPreserveGLStateAtDestroy(true);
+ }
+
+ @Override
public synchronized void destroyActionPreLock() {
// nop
}
@@ -433,7 +438,7 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind
//Exception e1 = new Exception(msg);
//e1.printStackTrace();
}
-
+
destroyImplInLock();
if(Window.DEBUG_IMPLEMENTATION) {
@@ -479,8 +484,11 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind
}
drawable = (GLDrawableImpl) factory.createGLDrawable(nw);
drawable.setRealized(true);
- context = (GLContextImpl) drawable.createContext(sharedContext);
- context.setContextCreationFlags(additionalCtxCreationFlags);
+
+ if( !GLWindow.this.pushGLEventListenerState() ) {
+ context = (GLContextImpl) drawable.createContext(sharedContext);
+ context.setContextCreationFlags(additionalCtxCreationFlags);
+ }
}
if(Window.DEBUG_IMPLEMENTATION) {
System.err.println("GLWindow.setVisibleActionPost("+visible+", "+nativeWindowCreated+") "+WindowImpl.getThreadName()+", fin: dt "+ (System.nanoTime()-t0)/1e6 +"ms");
@@ -512,7 +520,7 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind
//
private GLContext sharedContext = null;
-
+
@Override
protected final RecursiveLock getLock() {
return window.getLock();
@@ -571,10 +579,6 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind
}
@Override
- public final void setRealized(boolean realized) {
- }
-
- @Override
public final void swapBuffers() throws GLException {
defaultSwapBuffers();
}