From 3ad03e41a0cda81119c23f350c00b064a4de70c2 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 22 Mar 2013 10:29:54 +0100 Subject: Add GLStateKeeper handling GLEventListenerState preservation and restauration for GLAutoDrawable - New GLStateKeeper interface, package com.jogamp.opengl Implemented by: - GLAutoDrawableBase Currently supported by: - NEWT GLWindow - GLEventListenerState package move: com.jogamp.opengl.util -> com.jogamp.opengl --- src/newt/classes/com/jogamp/newt/opengl/GLWindow.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/newt/classes/com/jogamp') diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java index 33f136460..a6c655915 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java +++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java @@ -421,8 +421,8 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind protected class GLLifecycleHook implements WindowImpl.LifecycleHook { @Override - public void setPreserveResourcesAtDestroy() { - GLWindow.this.setPreserveGLStateAtDestroy(true); + public void preserveGLStateAtDestroy() { + GLWindow.this.preserveGLStateAtDestroy(true); } @Override @@ -567,6 +567,9 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind setVisible(true); } } + + @Override + public final boolean isGLStatePreservationSupported() { return true; } //---------------------------------------------------------------------- // GLDrawable methods -- cgit v1.2.3