Trees | Indices | Toggle frames |
---|
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.
VertexDomain
Management of a set of vertex lists.
|
|
VertexList
A list of vertices within a VertexDomain.
|
|
IndexedVertexDomain
Management of a set of indexed vertex lists.
|
|
IndexedVertexList
A list of vertices within an IndexedVertexDomain that are indexed.
|
create_attribute_usage(format)
Create an attribute and usage pair from a format string.
|
|
VertexDomain |
create_domain(*attribute_usage_formats)
Create a vertex domain covering the given attribute usage formats.
|
VertexDomain |
create_indexed_domain(*attribute_usage_formats)
Create an indexed vertex domain covering the given attribute usage
formats.
|
__package__ =
|
Create an attribute and usage pair from a format string. The format string is as documented in pyglet.graphics.vertexattribute, with the addition of an optional usage component:
usage ::= attribute ( '/' ('static' | 'dynamic' | 'stream' | 'none') )?
If the usage is not given it defaults to 'dynamic'. The usage corresponds to the OpenGL VBO usage hint, and for static also indicates a preference for interleaved arrays. If none is specified a buffer object is not created, and vertex data is stored in system memory.
Some examples:
Trees | Indices | Toggle frames |
---|
Generated by Epydoc 3.0beta1 on Thu Dec 31 17:58:18 2009 | http://epydoc.sourceforge.net |