Group Class

Inheritance diagram of Group

class Group(parent=None)

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:

__init__(parent=None)

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.

Methods

Group.set_state()

Apply the OpenGL state change.

The default implementation does nothing.

Group.set_state_recursive()

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.

Group.unset_state()

Repeal the OpenGL state change.

The default implementation does nothing.

Group.unset_state_recursive()

Unset this group and its ancestry.

The inverse of set_state_recursive.

Table Of Contents

Previous topic

Batch Class

Next topic

NullGroup Class