Package com.jogamp.opengl
Interface GLStateKeeper
- All Known Implementing Classes:
jogamp.opengl.GLAutoDrawableBase
,GLAutoDrawableDelegate
public interface GLStateKeeper
Interface adding a
GLEventListenerState
protocol to GLAutoDrawable
s
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 interface
Listener for preserve and restore notifications. -
Method Summary
Modifier and TypeMethodDescriptionClears the preservedGLEventListenerState
from thisGLStateKeeper
, without destroying it.Returns the preservedGLEventListenerState
if preservation was performed, otherwisenull
.boolean
boolean
preserveGLStateAtDestroy
(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:
true
if GL state preservation is supported in implementation and on current platform,false
otherwise.- See Also:
-
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:
-
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:
-