Buffer#
- class arcade.gl.Buffer(ctx: Context, data: Optional[Any] = None, reserve: int = 0, usage: str = 'static')[source]#
Bases:
object
OpenGL buffer object. Buffers store byte data and upload it to graphics memory so shader programs can process the data. They are used for storage of vertex data, element data (vertex indexing), uniform block data etc.
Buffer objects should be created using
arcade.gl.Context.buffer()
- Parameters
- property glo: ctypes.c_uint#
The OpenGL resource id
- Type
gl.GLuint
- delete()[source]#
Destroy the underlying OpenGL resource. Don’t use this unless you know exactly what you are doing.
- static delete_glo(ctx: Context, glo: ctypes.c_uint)[source]#
Release/delete open gl buffer. This is automatically called when the object is garbage collected.
- copy_from_buffer(source: arcade.gl.buffer.Buffer, size=- 1, offset=0, source_offset=0)[source]#
Copy data into this buffer from another buffer
- orphan(size: int = - 1, double: bool = False)[source]#
Re-allocate the entire buffer memory. This can be used to resize a buffer or for re-specification (orphan the buffer to avoid blocking).
If the current buffer is busy in rendering operations it will be deallocated by OpenGL when completed.