Source code for picogl.buffers.attributes

from dataclasses import dataclass
from typing import List


@dataclass
[docs] class AttributeSpec:
[docs] name: str # semantic name ("positions", "colors", "normals", etc.)
[docs] index: int # attribute location
[docs] size: int # number of components (e.g., 3 for vec3)
[docs] type: int # GL_FLOAT, GL_INT, etc.
[docs] normalized: bool
[docs] stride: int
[docs] offset: int # in bytes
@dataclass
[docs] class LayoutDescriptor:
[docs] attributes: List[AttributeSpec]