Abstract buffer of byte data.
Variables: |
|
---|
Methods:
bind() Bind this buffer to its OpenGL target. delete() Delete this buffer, reducing system resource usage. map([invalidate]) Map the entire buffer into system memory. resize(size) Resize the buffer to a new size. set_data(data) Set the entire contents of the buffer. set_data_region(data, start, length) Set part of the buffer contents. unbind() Reset the buffer’s OpenGL target. unmap() Unmap a previously mapped memory block.
Attributes:
Bind this buffer to its OpenGL target.
Delete this buffer, reducing system resource usage.
Map the entire buffer into system memory.
The mapped region must be subsequently unmapped with unmap before performing any other operations on the buffer.
Parameters: | invalidate (bool) – If True, the initial contents of the mapped block need not reflect the actual contents of the buffer. |
---|---|
Return type: | POINTER(ctypes.c_ubyte) |
Returns: | Pointer to the mapped block in memory |
Resize the buffer to a new size.
Parameters: | size (int) – New size of the buffer, in bytes |
---|
Set the entire contents of the buffer.
Parameters: | data (sequence of int or ctypes pointer) – The byte array to set. |
---|
Set part of the buffer contents.
Parameters: |
|
---|
Reset the buffer’s OpenGL target.
Unmap a previously mapped memory block.