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.

Classes

IndexedVertexDomain Management of a set of indexed vertex lists.
IndexedVertexList A list of vertices within an IndexedVertexDomain that are indexed.
VertexDomain Management of a set of vertex lists.
VertexList A list of vertices within a VertexDomain. Use

Functions

create_attribute_usage(format) Create an attribute and usage pair from a format string.
create_domain(*attribute_usage_formats) Create a vertex domain covering the given attribute usage formats.
create_indexed_domain(*attribute_usage_formats) Create an indexed vertex domain covering the given attribute usage formats.

Variables

compat_platform = 'linux2'

str(object=’‘) -> string

Return a nice string representation of the object. If the argument is a string, the return value is the same object.

Notes

Defined

  • allocation
  • gl
  • glext_arb
  • glu
  • lib
  • lib_glx
  • re
  • vertexattribute
  • vertexbuffer

Table Of Contents

Previous topic

create_mappable_buffer Function

Next topic

IndexedVertexDomain Class