Package com.jogamp.opengl
Interface GLStateKeeper
-
- All Known Implementing Classes:
jogamp.opengl.GLAutoDrawableBase,GLAutoDrawableDelegate
public interface GLStateKeeperInterface adding aGLEventListenerStateprotocol toGLAutoDrawables or other self-contained compound types combiningGLDrawable,GLContextandGLEventListener.Implementing classes
may supportpreservation of theGLContextstate and it's associatedGLEventListener.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceGLStateKeeper.ListenerListener for preserve and restore notifications.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GLEventListenerStateclearPreservedGLState()Clears the preservedGLEventListenerStatefrom thisGLStateKeeper, without destroying it.GLEventListenerStategetPreservedGLState()Returns the preservedGLEventListenerStateif preservation was performed, otherwisenull.booleanisGLStatePreservationSupported()booleanpreserveGLStateAtDestroy(boolean value)GLStateKeeper.ListenersetGLStateKeeperListener(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:
trueif GL state preservation is supported in implementation and on current platform,falseotherwise.- See Also:
preserveGLStateAtDestroy(boolean),getPreservedGLState(),clearPreservedGLState()
-
preserveGLStateAtDestroy
boolean preserveGLStateAtDestroy(boolean value)
If set totrue, the nextGLAutoDrawable.destroy()operation willpreservetheGLEventListenerState.This is a one-shot flag, i.e. after preserving the
GLEventListenerState, the flag is cleared.A preserved
GLEventListenerStatewill berestoredagain.- Returns:
trueif supported and successful,falseotherwise.- See Also:
isGLStatePreservationSupported(),getPreservedGLState(),clearPreservedGLState()
-
getPreservedGLState
GLEventListenerState getPreservedGLState()
Returns the preservedGLEventListenerStateif preservation was performed, otherwisenull.
-
clearPreservedGLState
GLEventListenerState clearPreservedGLState()
Clears the preservedGLEventListenerStatefrom thisGLStateKeeper, without destroying it.- Returns:
- the preserved and cleared
GLEventListenerStateif preservation was performed, otherwisenull. - See Also:
isGLStatePreservationSupported(),preserveGLStateAtDestroy(boolean),getPreservedGLState()
-
-