picogl.gpu.buffers.vertex.legacy
This module provides the VertexBufferGroup class, which is a container for legacy VBOs that mimics the VAO interface. It supports the creation, management, binding, and drawing of vertex buffer objects (VBOs) and element buffer objects (EBOs).
Classes: - VertexBufferGroup: Manages various VBOs and provides functionality for
adding, accessing, and drawing vertex buffer data.
Classes
Container for legacy VBOs, mimicking VAO interface. |
Module Contents
- class picogl.gpu.buffers.vertex.legacy.VertexBufferGroup(draw_mode: picogl.backend.gl.enums.GLDrawMode = GLDrawMode.LINE_STRIP)[source]
Bases:
picogl.gpu.buffers.base.VertexBaseContainer for legacy VBOs, mimicking VAO interface.
- layout: picogl.gpu.buffers.attributes.LayoutDescriptor | None = None[source]
- named_vbos: dict[picogl.gpu.buffers.vertex.aliases.VertexBufferRole | str, picogl.backend.legacy.core.vertex.buffer.vertex.LegacyVBO][source]
- draw_mode: picogl.backend.gl.enums.GLDrawMode[source]
- property vbo: picogl.backend.legacy.core.vertex.buffer.position.LegacyPositionVBO | int | None[source]
- property cbo: picogl.backend.legacy.core.vertex.buffer.color.LegacyColorVBO | int | None[source]
- property nbo: picogl.backend.legacy.core.vertex.buffer.normal.LegacyNormalVBO | int | None[source]
- property ebo: picogl.backend.legacy.core.vertex.buffer.element.LegacyEBO | int | None[source]
- _set_named_vbo(role: picogl.gpu.buffers.vertex.aliases.VertexBufferRole, value: picogl.backend.legacy.core.vertex.buffer.vertex.LegacyVBO | int | 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: picogl.backend.gl.enums.GLDrawMode | None = None)[source]
draw
- Parameters:
index_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 = GLNumeric.FLOAT, handle: int | None = None) Any[source]
Create and register a VBO with explicit parameters.
- get_buffer_class(name: str = VBOType.VBO) type[picogl.backend.legacy.core.vertex.buffer.vertex.LegacyVBO][source]
get_buffer_class
- Parameters:
name – str
- Returns:
LegacyVBO
- add_ebo(name: str = VBOType.EBO, data: numpy.ndarray = None)[source]
add_ebo
- Parameters:
name – str
data – np.ndarray
- set_layout(layout: picogl.gpu.buffers.attributes.LayoutDescriptor) None[source]
Define the attribute layout for this VAO/group.
- _resolve_client_states() tuple[picogl.backend.gl.state.client.GLClientState, Ellipsis][source]
Return legacy client states to enable for the current layout.
- _buffer_handle(vbo: picogl.backend.legacy.core.vertex.buffer.vertex.LegacyVBO | int) int[source]