picogl.protocols.drawable_buffer
OpenGL buffer protocols for ElMo.
Defines a shared interface (DrawableBuffer) for buffer/VAO objects used in legacy and modern backends, so group-level and draw code can treat them uniformly.
Attributes
Classes
Protocol for OpenGL buffer/VAO objects that can be bound, drawn, and deleted. |
|
GPU object that owns or delegates one CPU mesh. |
|
Single legacy/modern VBO or EBO with CPU-side |
|
Wrapper or group holding nested VAO/VBO handles (e.g. ElMo buffer groups). |
Module Contents
- class picogl.protocols.drawable_buffer.DrawableBuffer[source]
Bases:
ProtocolProtocol for OpenGL buffer/VAO objects that can be bound, drawn, and deleted.
Implementors must provide bind(), unbind(), draw(), and delete(). Optional: is_valid() for validity checks; __enter__/__exit__ for context-manager support (with obj: obj.draw()).
Legacy VBO groups and modern VAOs (VertexArrayObject, RibbonVBG, etc.) conform to this protocol.
- class picogl.protocols.drawable_buffer.MeshDrawable[source]
Bases:
ProtocolGPU object that owns or delegates one CPU mesh.
The mesh value is always
MeshData. Lookup helpers useisinstance(..., MeshData); this protocol does not replace that check. Onlymesh_datais part of the protocol. Draw and color upload stay onDrawableBufferand the layout color helpers.- property mesh_data: picogl.renderer.meshdata.MeshData | None[source]
Attached
MeshData, orNone.
- class picogl.protocols.drawable_buffer.VertexBufferDataSource[source]
Bases:
ProtocolSingle legacy/modern VBO or EBO with CPU-side
data.- data: numpy.ndarray | None[source]
- class picogl.protocols.drawable_buffer.BufferContainer[source]
Bases:
ProtocolWrapper or group holding nested VAO/VBO handles (e.g. ElMo buffer groups).
- vao: DrawableBuffer | int | None[source]
- vbo: VertexBufferDataSource | int | None[source]
- named_vbos: Mapping[Any, VertexBufferDataSource][source]
- type picogl.protocols.drawable_buffer.DrawableLengthInput = DrawableBuffer | BufferContainer | VertexBufferDataSource | None[source]