Trees | Indices | Toggle frames |
---|
AbstractBuffer --+ | VertexBufferObject
Lightweight representation of an OpenGL VBO.
The data in the buffer is not replicated in any system memory (unless it is done so by the video driver). While this can improve memory usage and possibly performance, updates to the buffer are relatively slow.
This class does not implement AbstractMappable, and so has no get_region method. See MappableVertexBufferObject for a VBO class that does implement get_region.
__init__(self, size, target, usage) | |
bind(self)
Bind this buffer to its OpenGL target.
|
|
unbind(self)
Reset the buffer's OpenGL target.
|
|
set_data(self,
data)
Set the entire contents of the buffer.
|
|
set_data_region(self,
data,
start,
length)
Set part of the buffer contents.
|
|
POINTER(ctypes.c_ubyte) |
map(self,
invalidate=False)
Map the entire buffer into system memory.
|
unmap(self)
Unmap a previously mapped memory block.
|
|
__del__(self) | |
delete(self)
Delete this buffer, reducing system resource usage.
|
|
resize(self,
size)
Resize the buffer to a new size.
|
int |
ptr = 0
Memory offset of the buffer, as used by the glVertexPointer
family of functions
(Inherited from pyglet.graphics.vertexbuffer.AbstractBuffer)
|
int |
size = 0
Size of buffer, in bytes
(Inherited from pyglet.graphics.vertexbuffer.AbstractBuffer)
|
int |
target
OpenGL buffer target, for example GL_ARRAY_BUFFER
(Inherited from pyglet.graphics.vertexbuffer.AbstractBuffer)
|
int |
usage
OpenGL buffer usage, for example GL_DYNAMIC_DRAW
(Inherited from pyglet.graphics.vertexbuffer.AbstractBuffer)
|
Map the entire buffer into system memory.
The mapped region must be subsequently unmapped with unmap before performing any other operations on the buffer.
Trees | Indices | Toggle frames |
---|
Generated by Epydoc 3.0beta1 on Thu Dec 31 17:58:18 2009 | http://epydoc.sourceforge.net |