Source code for picogl.backend.geometry.mesh

"""GPU-resident mesh abstraction."""

from __future__ import annotations

from abc import ABC, abstractmethod
from typing import Any


[docs] class GPUMesh(ABC): """Uploaded or CPU-bound geometry ready for bind + draw.""" @abstractmethod
[docs] def bind(self) -> None: """Bind GPU buffers or client arrays for drawing."""
@abstractmethod
[docs] def draw(self, mode: int) -> None: """Issue draw calls for the bound mesh."""
[docs] def unbind(self) -> None: """Release binding after draw (optional)."""
[docs] def delete(self) -> None: """Release GPU resources (optional)."""