Skip to main content

Module graphics_pipeline

Module graphics_pipeline 

Source
Expand description

Graphics primitive pipeline.

Evolution: M0.12 (rect/rounded rect) β†’ M0.13 (ellipse / line / stroke) β†’ M0.14 (linear + radial gradient fills).

All graphics primitives across all Graphics nodes batch into a single draw call. Stroked primitives emit a second outline instance. Lines are rendered as rotated thin rects.

StructsΒ§

CollectedGraphics πŸ”’
GraphicsInstance πŸ”’
GraphicsPipeline πŸ”’
PolygonVertex πŸ”’
One vertex of a polygon’s fan triangulation. Position is in clip space β€” the world matrix is baked CPU-side during the scene walk, since polygon vertex counts are variable and don’t fit the per-instance model the SDF primitives use.
ResolvedFill πŸ”’

ConstantsΒ§

ATTR_LAYOUT πŸ”’
FILL_LINEAR πŸ”’
FILL_RADIAL πŸ”’
FILL_SOLID πŸ”’
KIND_ANNULAR_SECTOR πŸ”’
KIND_ELLIPSE πŸ”’
KIND_RECT πŸ”’
MODE_FILL πŸ”’
MODE_OUTLINE πŸ”’
POLYGON_ATTR_LAYOUT πŸ”’

FunctionsΒ§

annular_sector_instance πŸ”’
apply_alpha πŸ”’
collect_graphics πŸ”’
Walk the scene and bucket every primitive a Graphics node emits, separated into:
ellipse_instance πŸ”’
emit_polygon πŸ”’
Fan-triangulate a convex polygon and bake each vertex into clip space via world. Non-convex polygons produce visible overlap β€” that’s the documented v1 limitation.
emit_primitive πŸ”’
rect_instance πŸ”’
resolve_fill πŸ”’