triangle_primitive

Batched triangle geometry for the renderer.

TrianglePrimitive is what a mesh Mob hands the renderer: a batch of triangles as corner positions, normals and per-vertex colors, along with the material parameters the shading kernel reads.

Primitives from many Mobs are grouped by get_batch_identifier() and rebuilt into one merged primitive per group, reducing per-object preparation work. project_to_screen shades and packs a frame window; actual kernel-launch count depends on the renderer, tiling and transport work, not just group count.

This is the flat-triangle representation. PN surfaces are diced into triangles during preparation; Bezier outlines use BezierCircuitPrimitive.

Classes