picogl.buffers.vertex.legacy
VertexArrayGroup
Legacy backend (no real GL VAO support)
Classes
Container for legacy VBOs, mimicking VAO interface. |
Module Contents
- class picogl.buffers.vertex.legacy.VertexBufferGroup(draw_mode: int = GL_LINE_STRIP)[source]
Bases:
picogl.buffers.base.VertexBaseContainer for legacy VBOs, mimicking VAO interface.
- layout: picogl.buffers.attributes.LayoutDescriptor | None = None[source]
- add_vbo_object(name: str, vbo: picogl.backend.legacy.core.vertex.buffer.vertex.LegacyVBO) picogl.backend.legacy.core.vertex.buffer.vertex.LegacyVBO[source]
Register a VBO by semantic name or shorthand alias.
- get_vbo_object(name: str) picogl.backend.legacy.core.vertex.buffer.vertex.LegacyVBO[source]
Retrieve a VBO by its semantic or shorthand name.
- draw(index_count: int = 0, mode: int = GL_POINTS)[source]
draw
- Parameters:
index_count
count – int
mode – int
Enable legacy client states, bind VBOs, draw, and clean up.
- add_vbo(name: str, data: numpy.ndarray, size: int = 3, dtype: int = GL_FLOAT, handle: int | None = None) Any[source]
Create and register a VBO with explicit parameters.
- get_buffer_class(name: str = 'vbo') type[picogl.backend.legacy.core.vertex.buffer.vertex.LegacyVBO][source]
get_buffer_class
- Parameters:
name – str
- Returns:
LegacyVBO
- add_ebo(name: str = 'ebo', data: numpy.ndarray = None)[source]
add_ebo
- Parameters:
name – str
data – np.ndarray
- draw_elements(count: int = 0, mode: int = GL_TRIANGLES, dtype: int = GL_UNSIGNED_INT, offset: int = 0)[source]
Draw using an element buffer (EBO) with legacy client states.
- Parameters:
count – Number of indices to draw. Defaults to self.index_count.
mode – OpenGL primitive type (GL_TRIANGLES, GL_LINES, etc.).
dtype – Data type of indices (GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, GL_UNSIGNED_INT).
offset – Byte offset into the EBO.
- set_layout(layout: picogl.buffers.attributes.LayoutDescriptor) None[source]
Define the attribute layout for this VAO/group.