JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.GLStateKeeper Interface Reference

Interface adding a GLEventListenerState protocol to GLAutoDrawables or other self-contained compound types combining GLDrawable, GLContext and GLEventListener. More...

Collaboration diagram for com.jogamp.opengl.GLStateKeeper:

Classes

interface  Listener
 Listener for preserve and restore notifications. More...
 

Public Member Functions

Listener setGLStateKeeperListener (Listener l)
 Sets a Listener, overriding the old one. More...
 
boolean isGLStatePreservationSupported ()
 
boolean preserveGLStateAtDestroy (boolean value)
 If set to true, the next GLAutoDrawable#destroy() operation will preserve the GLEventListenerState. More...
 
GLEventListenerState getPreservedGLState ()
 Returns the preserved GLEventListenerState if preservation was performed, otherwise null. More...
 
GLEventListenerState clearPreservedGLState ()
 Clears the preserved GLEventListenerState from this GLStateKeeper, without destroying it. More...
 

Detailed Description

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.

Definition at line 38 of file GLStateKeeper.java.

Member Function Documentation

◆ clearPreservedGLState()

GLEventListenerState com.jogamp.opengl.GLStateKeeper.clearPreservedGLState ( )

Clears the preserved GLEventListenerState from this GLStateKeeper, without destroying it.

Returns
the preserved and cleared GLEventListenerState if preservation was performed, otherwise null.
See also
isGLStatePreservationSupported()
preserveGLStateAtDestroy(boolean)
getPreservedGLState()

◆ getPreservedGLState()

GLEventListenerState com.jogamp.opengl.GLStateKeeper.getPreservedGLState ( )

Returns the preserved GLEventListenerState if preservation was performed, otherwise null.

See also
isGLStatePreservationSupported()
preserveGLStateAtDestroy(boolean)
clearPreservedGLState()

◆ isGLStatePreservationSupported()

boolean com.jogamp.opengl.GLStateKeeper.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 com.jogamp.opengl.GLStateKeeper.preserveGLStateAtDestroy ( boolean  value)

If set to true, the next GLAutoDrawable#destroy() operation will preserve the GLEventListenerState.

This is a one-shot flag, i.e. after preserving the GLEventListenerState, the flag is cleared.

A preserved GLEventListenerState will be restored again.

Returns
true if supported and successful, false otherwise.
See also
isGLStatePreservationSupported()
getPreservedGLState()
clearPreservedGLState()

◆ setGLStateKeeperListener()

Listener com.jogamp.opengl.GLStateKeeper.setGLStateKeeperListener ( Listener  l)

Sets a Listener, overriding the old one.

Parameters
lthe new Listener.
Returns
the previous Listener.

The documentation for this interface was generated from the following file: