picogl.renderer.legacy_glmesh
Classes
GL Mesh for Compatibility Profile (Legacy OpenGL) |
|
GL Mesh fir Compatibility Profile |
Module Contents
- class picogl.renderer.legacy_glmesh.LegacyGLMeshNew(vertices: numpy.ndarray, faces: numpy.ndarray | None, colors: numpy.ndarray | None = None, normals: numpy.ndarray | None = None, uvs: numpy.ndarray | None = None, use_indices: bool = True)[source]
GL Mesh for Compatibility Profile (Legacy OpenGL)
Keeps a similar interface to theIndexed version, but uses client-side arrays / legacy calls instead of VAOs/VBOs/EBOs.
- classmethod from_mesh_data(mesh: MeshData) LegacyGLMesh[source]
- _expand_to_non_indexed() None[source]
Expand indexed data to per-triangle vertex data for glDrawArrays.
- class picogl.renderer.legacy_glmesh.LegacyGLMesh(vertices: numpy.ndarray, faces: numpy.ndarray, colors: numpy.ndarray | None = None, normals: numpy.ndarray | None = None, uvs: numpy.ndarray | None = None)[source]
GL Mesh fir Compatibility Profile
GPU‐resident mesh: owns VAO/VBO/EBO/CBO/NBO for an indexed triangle mesh. It does not know anything about shaders or matrices.
- vao: picogl.buffers.vertex.legacy.VertexBufferGroup | None = None[source]
- classmethod from_mesh_data(mesh: MeshData) LegacyGLMesh[source]
Construct a GLMesh from a MeshData container.
- Parameters:
mesh (MeshData) – Must have .vbo (Nx3), .ebo (Mx1), optional .cbo (Nx3), .nbo (Nx3), uvs (Nx2)
- Returns:
Ready-to-upload mesh (GPU buffers are allocated only when upload() is called).
- Return type: