pyglet.graphics.vertexdomain
Manage related vertex attributes within a single vertex domain.
A vertex “domain” consists of a set of attribute descriptions that together describe the layout of one or more vertex buffers which are used together to specify the vertices in a primitive. Additionally, the domain manages the buffers used to store the data and will resize them as necessary to accommodate new vertices.
Domains can optionally be indexed, in which case they also manage a buffer containing vertex indices. This buffer is grown separately and has no size relation to the attribute buffers.
Applications can create vertices (and optionally, indices) within a domain
with the VertexDomain.create() method. This returns a
VertexList representing the list of vertices created. The vertex
attribute data within the group can be modified, and the changes will be made
to the underlying buffers automatically.
The entire domain can be efficiently drawn in one step with the
VertexDomain.draw() method, assuming all the vertices comprise
primitives of the same OpenGL primitive mode.
- class IndexedVertexDomain
Management of a set of indexed vertex lists.
Construction of an indexed vertex domain is usually done with the
create_domain()function.-
index_buffer:
IndexedBufferObject
-
index_c_type:
Type[_SimpleCData]
-
index_element_size:
int
-
index_gl_type:
int
-
index_buffer:
- class IndexedVertexList
A list of vertices within an
IndexedVertexDomainthat are indexed.Use
IndexedVertexDomain.create()to construct this list.-
index_count:
int
-
index_start:
int
-
indexed:
bool= True
- property indices: list[int]
Array of index data.
-
index_count:
- class InstancedIndexedVertexDomain
Management of a set of indexed vertex lists.
Construction of an indexed vertex domain is usually done with the
create_domain()function.
- class VertexDomain
Management of a set of vertex lists.
Construction of a vertex domain is usually done with the
create_domain()function.-
attrib_name_buffers:
dict[str,AttributeBufferObject]
-
attribute_meta:
dict[str,dict[str,Any]]
-
buffer_attributes:
list[tuple[AttributeBufferObject,Attribute]]
- property is_empty: bool
-
vao:
VertexArray
-
attrib_name_buffers:
- class VertexInstance
- property domain: InstancedVertexDomain | InstancedIndexedVertexDomain
-
id:
int
-
start:
int
- class VertexList
A list of vertices within a
VertexDomain.Use
VertexDomain.create()to construct this list.-
count:
int
-
domain:
VertexDomain|InstancedVertexDomain
-
indexed:
bool= False
-
initial_attribs:
dict
-
instanced:
bool= False
-
start:
int
-
count: