Package com.jogamp.opengl
Interface GLStateKeeper
-
- All Known Implementing Classes:
jogamp.opengl.GLAutoDrawableBase
,GLAutoDrawableDelegate
public interface GLStateKeeper
Interface adding aGLEventListenerState
protocol toGLAutoDrawable
s or other self-contained compound types combiningGLDrawable
,GLContext
andGLEventListener
.Implementing classes
may support
preservation of theGLContext
state and it's associatedGLEventListener
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
GLStateKeeper.Listener
Listener for preserve and restore notifications.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GLEventListenerState
clearPreservedGLState()
Clears the preservedGLEventListenerState
from thisGLStateKeeper
, without destroying it.GLEventListenerState
getPreservedGLState()
Returns the preservedGLEventListenerState
if preservation was performed, otherwisenull
.boolean
isGLStatePreservationSupported()
boolean
preserveGLStateAtDestroy(boolean value)
GLStateKeeper.Listener
setGLStateKeeperListener(GLStateKeeper.Listener l)
Sets aGLStateKeeper.Listener
, overriding the old one.
-
-
-
Method Detail
-
setGLStateKeeperListener
GLStateKeeper.Listener setGLStateKeeperListener(GLStateKeeper.Listener l)
Sets aGLStateKeeper.Listener
, overriding the old one.- Parameters:
l
- the newGLStateKeeper.Listener
.- Returns:
- the previous
GLStateKeeper.Listener
.
-
isGLStatePreservationSupported
boolean isGLStatePreservationSupported()
- Returns:
true
if GL state preservation is supported in implementation and on current platform,false
otherwise.- See Also:
preserveGLStateAtDestroy(boolean)
,getPreservedGLState()
,clearPreservedGLState()
-
preserveGLStateAtDestroy
boolean preserveGLStateAtDestroy(boolean value)
If set totrue
, the nextGLAutoDrawable.destroy()
operation willpreserve
theGLEventListenerState
.This is a one-shot flag, i.e. after preserving the
GLEventListenerState
, the flag is cleared.A preserved
GLEventListenerState
will berestored
again.- Returns:
true
if supported and successful,false
otherwise.- See Also:
isGLStatePreservationSupported()
,getPreservedGLState()
,clearPreservedGLState()
-
getPreservedGLState
GLEventListenerState getPreservedGLState()
Returns the preservedGLEventListenerState
if preservation was performed, otherwisenull
.
-
clearPreservedGLState
GLEventListenerState clearPreservedGLState()
Clears the preservedGLEventListenerState
from thisGLStateKeeper
, without destroying it.- Returns:
- the preserved and cleared
GLEventListenerState
if preservation was performed, otherwisenull
. - See Also:
isGLStatePreservationSupported()
,preserveGLStateAtDestroy(boolean)
,getPreservedGLState()
-
-