Top Description Inners Methods
com.jogamp.opengl

public Interface GLStateKeeper

Known Direct Implementers
jogamp.opengl.GLAutoDrawableBase

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 and Inner Type Summary

Modifier and TypeClass and Description
public static interface
GLStateKeeper.Listener

Listener for preserve and restore notifications.

Method Summary

Modifier and TypeMethod and Description
public GLEventListenerState

Returns:

the preserved and cleared GLEventListenerState if preservation was performed, otherwise null.
clearPreservedGLState
()

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

public GLEventListenerState
getPreservedGLState()

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

public boolean

Returns:

true if GL state preservation is supported in implementation and on current platform, false otherwise.
isGLStatePreservationSupported
()

public boolean

Returns:

true if supported and successful, false otherwise.
preserveGLStateAtDestroy
(boolean value)

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

public GLStateKeeper.Listener

Returns:

the previous Listener.
setGLStateKeeperListener
(GLStateKeeper.Listener
the new Listener.
l
)

Sets a Listener, overriding the old one.

Method Detail

clearPreservedGLStateback to summary
public GLEventListenerState clearPreservedGLState()

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

Returns:GLEventListenerState

the preserved and cleared GLEventListenerState if preservation was performed, otherwise null.

See Also
isGLStatePreservationSupported(), preserveGLStateAtDestroy(boolean), getPreservedGLState()
getPreservedGLStateback to summary
public GLEventListenerState getPreservedGLState()

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

See Also
isGLStatePreservationSupported(), preserveGLStateAtDestroy(boolean), clearPreservedGLState()
isGLStatePreservationSupportedback to summary
public boolean isGLStatePreservationSupported()
Returns:boolean

true if GL state preservation is supported in implementation and on current platform, false otherwise.

See Also
preserveGLStateAtDestroy(boolean), getPreservedGLState(), clearPreservedGLState()
preserveGLStateAtDestroyback to summary
public boolean 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:boolean

true if supported and successful, false otherwise.

See Also
isGLStatePreservationSupported(), getPreservedGLState(), clearPreservedGLState()
setGLStateKeeperListenerback to summary
public GLStateKeeper.Listener setGLStateKeeperListener(GLStateKeeper.Listener l)

Sets a Listener, overriding the old one.

Parameters
l:GLStateKeeper.Listener

the new Listener.

Returns:GLStateKeeper.Listener

the previous Listener.

com.jogamp.opengl back to summary

public Interface GLStateKeeper.Listener


Listener for preserve and restore notifications.

Method Summary

Modifier and TypeMethod and Description
public void
glStatePreserveNotify(GLStateKeeper glsk)

Invoked before preservation.

public void
glStateRestored(GLStateKeeper glsk)

Invoked after restoration.

Method Detail

glStatePreserveNotifyback to summary
public void glStatePreserveNotify(GLStateKeeper glsk)

Invoked before preservation.

glStateRestoredback to summary
public void glStateRestored(GLStateKeeper glsk)

Invoked after restoration.