Package com.jogamp.opengl
Interface GLStateKeeper
- All Known Implementing Classes:
jogamp.opengl.GLAutoDrawableBase,GLAutoDrawableDelegate,GLWindow
public interface GLStateKeeper
Interface adding a
GLEventListenerState protocol to GLAutoDrawables
or other self-contained compound types combining GLDrawable, GLContext and GLEventListener.
Implementing classes may support preservation
of the GLContext state and it's associated GLEventListener.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceListener for preserve and restore notifications. -
Method Summary
Modifier and TypeMethodDescriptionClears the preservedGLEventListenerStatefrom thisGLStateKeeper, without destroying it.Returns the preservedGLEventListenerStateif preservation was performed, otherwisenull.booleanbooleanpreserveGLStateAtDestroy(boolean value) Sets aGLStateKeeper.Listener, overriding the old one.
-
Method Details
-
setGLStateKeeperListener
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 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:
-
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:
-