picogl.utils.mesh
Mesh helpers built on PicoGL loaders and GL buffer APIs.
Submodules
Classes
Unit cube with position + UV buffers (non-indexed glDrawArrays). |
|
Position + UV adapter: |
|
OBJ mesh with GPU buffer upload helpers (positions + UVs + ushort indices). |
|
Position + UV mesh with GPU upload and draw. |
Functions
|
Factory for |
|
Invert V for DDS/top-left origin ( |
Package Contents
- class picogl.utils.mesh.CubeMesh(vertices: list[float], texcoords: list[float])[source]
Unit cube with position + UV buffers (non-indexed glDrawArrays).
- vertices
- texcoords
- _vertex_count
- class picogl.utils.mesh.MeshDataMesh(data: picogl.renderer.meshdata.MeshData, *, flip_v: bool = False)[source]
Position + UV adapter:
MeshData→MeshProtocolupload/draw.- vertices = []
- texcoords = []
- indices = []
- _vertex_count
- _use_ushort
- picogl.utils.mesh.meshdata_factory(data: picogl.renderer.meshdata.MeshData) Callable[[bool], picogl.utils.mesh.protocol.MeshProtocol][source]
Factory for
TexturedRendererSpec.create_meshfrom aMeshData.
- class picogl.utils.mesh.MeshObject(path: pathlib.Path | str)[source]
OBJ mesh with GPU buffer upload helpers (positions + UVs + ushort indices).
- path
- get_mesh(*, flip_v: bool = False) MeshObject[source]