picogl.renderer.legacy_glmesh
Module for creating and managing GPU-resident meshes in a legacy OpenGL compatibility profile.
This module defines the LegacyGLMesh class, which represents an indexed triangle mesh. It provides functionality for uploading mesh data to GPU buffers, managing their lifecycle, and rendering the mesh.
Classes
- LegacyGLMesh
Represents a GPU-resident mesh with VAO/VBO/EBO/CBO/NBO structures for an indexed triangle mesh.
Classes
gl Mesh fir Compatibility Profile |
Module Contents
- 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.
- classmethod from_mesh_data(mesh: MeshData) LegacyGLMesh[source]
Construct a GLMesh from a MeshData container.
- Parameters:
mesh (MeshData) – Must have .vertices (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: