Group of common OpenGL state.
Before a vertex list is rendered, its group’s OpenGL state is set; as are that state’s ancestors’ states. This can be defined arbitrarily on subclasses; the default state change has no effect, and groups vertex lists only in the order in which they are drawn.
Constructor:
Create a group.
Parameters: | parent (Group) – Group to contain this group; its state will be set before this state’s. |
---|
Methods:
set_state() Apply the OpenGL state change. set_state_recursive() Set this group and its ancestry. unset_state() Repeal the OpenGL state change. unset_state_recursive() Unset this group and its ancestry.
Apply the OpenGL state change.
The default implementation does nothing.
Set this group and its ancestry.
Call this method if you are using a group in isolation: the parent groups will be called in top-down order, with this class’s set being called last.
Repeal the OpenGL state change.
The default implementation does nothing.
Unset this group and its ancestry.
The inverse of set_state_recursive.