Top Description Inners Fields Constructors Methods
jogamp.opengl

public Class GLStateTracker

extends Object
Class Inheritance
Imports
com.jogamp.opengl.*, com.jogamp.common.util.IntIntHashMap, java.nio.IntBuffer, java.util.ArrayList

Tracks as closely as possible OpenGL states. GLStateTracker objects are allocated on a per-OpenGL-context basis.

Currently supported states: PixelStorei

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private volatile boolean
public static final int
MIN_CLIENT_ATTRIB_STACK_DEPTH

Minimum value of MAX_CLIENT_ATTRIB_STACK_DEPTH

private static final int
PIXEL_STATE_MAP_CAPACITY

avoid rehash of static size pixel state map

private IntIntHashMap
private final ArrayList<GLStateTracker.SavedState>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final void
public final boolean

Returns:

true if found in our map, otherwise false, which forces the caller to query GL.
getInt
(final int pname, final int[] params, final int params_offset)

public final boolean

Returns:

true if found in our map, otherwise false, which forces the caller to query GL.
getInt
(final int pname, final IntBuffer params, final int dummy)

public final boolean
public final void
public final void
pushAttrib(final int flags)

private final void
public final void
setEnabled(final boolean on)

public final void
setInt(final int pname, final int param)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enabledback to summary
private volatile boolean enabled
MIN_CLIENT_ATTRIB_STACK_DEPTHback to summary
public static final int MIN_CLIENT_ATTRIB_STACK_DEPTH

Minimum value of MAX_CLIENT_ATTRIB_STACK_DEPTH

PIXEL_STATE_MAP_CAPACITYback to summary
private static final int PIXEL_STATE_MAP_CAPACITY

avoid rehash of static size pixel state map

pixelStateMapback to summary
private IntIntHashMap pixelStateMap
stackback to summary
private final ArrayList<GLStateTracker.SavedState> stack

Constructor Detail

GLStateTrackerback to summary
public GLStateTracker()

Method Detail

clearStatesback to summary
public final void clearStates()
getIntback to summary
public final boolean getInt(final int pname, final int[] params, final int params_offset)
Returns:boolean

true if found in our map, otherwise false, which forces the caller to query GL.

getIntback to summary
public final boolean getInt(final int pname, final IntBuffer params, final int dummy)
Returns:boolean

true if found in our map, otherwise false, which forces the caller to query GL.

isEnabledback to summary
public final boolean isEnabled()
popAttribback to summary
public final void popAttrib()
pushAttribback to summary
public final void pushAttrib(final int flags)
resetStatesback to summary
private final void resetStates()
setEnabledback to summary
public final void setEnabled(final boolean on)
setIntback to summary
public final void setInt(final int pname, final int param)
jogamp.opengl back to summary

pack-priv Class GLStateTracker.SavedState

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private IntIntHashMap
pixelStateMap

Empty pixel-store state

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv final IntIntHashMap
getPixelStateMap()

get (client) pixel-store state, return reference

pack-priv final void
setPixelStateMap(final IntIntHashMap pixelStateMap)

set (client) pixel-store state, deep copy

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

pixelStateMapback to summary
private IntIntHashMap pixelStateMap

Empty pixel-store state

Constructor Detail

SavedStateback to summary
pack-priv SavedState()

Method Detail

getPixelStateMapback to summary
pack-priv final IntIntHashMap getPixelStateMap()

get (client) pixel-store state, return reference

setPixelStateMapback to summary
pack-priv final void setPixelStateMap(final IntIntHashMap pixelStateMap)

set (client) pixel-store state, deep copy