module State:Encapsulates the current applied OpenGL modes, attributes and vertex arrays settings, implements lazy state updating and provides accessors for querrying the current state.sig
..end
The venerable Red Book says that "OpenGL is a state machine", and this class represents the OpenGL state in OSG. Furthermore, State also has other important features:
State.push_state_set
and
State.pop_state_set
). Manipulating this stack of OpenGL states manually is
seldom needed, since OSG does this in the most common situations.glGet*()
,
which typically stall the graphics pipeline (see, for instance,
State.capture_current_state
and State.get_model_view_matrix
).type
t