psychopy.tools.gltools.VertexArrayInfo

class psychopy.tools.gltools.VertexArrayInfo(name=0, count=0, activeAttribs=None, indexBuffer=None, attribDivisors=None, isLegacy=False, userData=None)[source]

Vertex array object (VAO) descriptor.

This class only stores information about the VAO it refers to, it does not contain any actual array data associated with the VAO. Calling createVAO() returns instances of this class.

If isLegacy is True, attribute binding states are using deprecated (but still supported) pointer definition calls (eg. glVertexPointer). This is to ensure backwards compatibility. The keys stored in activeAttribs must be GLenum types such as GL_VERTEX_ARRAY.

Parameters:
  • name (int) – OpenGL handle for the VAO.

  • count (int) – Number of vertex elements. If indexBuffer is not None, count corresponds to the number of elements in the index buffer.

  • activeAttribs (dict) – Attributes and buffers defined as part of this VAO state. Keys are attribute pointer indices or capabilities (ie. GL_VERTEX_ARRAY). Modifying these values will not update the VAO state.

  • indexBuffer (VertexBufferInfo, optional) – Buffer object for indices.

  • attribDivisors (dict, optional) – Divisors for each attribute.

  • isLegacy (bool) – Array pointers were defined using the deprecated OpenGL API. If True, the VAO may work with older GLSL shaders versions and the fixed-function pipeline.

  • userData (dict or None, optional) – Optional user defined data associated with this VAO.

__init__(name=0, count=0, activeAttribs=None, indexBuffer=None, attribDivisors=None, isLegacy=False, userData=None)[source]

Methods

__init__([name, count, activeAttribs, ...])

Attributes

name

count

activeAttribs

indexBuffer

isLegacy

userData

attribDivisors


Back to top