Vertex buffer object (VBO) descriptor.
This class only stores information about the VBO it refers to, it does not
contain any actual array data associated with the VBO. Calling
createVBO()
returns instances of this class.
It is recommended to use gltools functions bindVBO()
,
unbindVBO()
, mapBuffer()
, etc. when working with these objects.
name (GLuint or int) – OpenGL handle for the buffer.
target (GLenum or int, optional) – Target used when binding the buffer (e.g. GL_VERTEX_ARRAY or GL_ELEMENT_ARRAY_BUFFER). Default is GL_VERTEX_ARRAY)
usage (GLenum or int, optional) – Usage type for the array (i.e. GL_STATIC_DRAW).
dataType (Glenum, optional) – Data type of array. Default is GL_FLOAT.
size (int, optional) – Size of the buffer in bytes.
stride (int, optional) – Number of bytes between adjacent attributes. If 0, values are assumed to be tightly packed.
shape (tuple or list, optional) – Shape of the array used to create this VBO.
userData (dict, optional) – Optional user defined data associated with the VBO. If None, userData will be initialized as an empty dictionary.
Methods
|
|
|
Check if the data contained in this descriptor matches what is actually present in the OpenGL state. |
Attributes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Check if the VBO assigned to name is a buffer. |
|
True if the buffer referred to by this object is an index array. |