Source code for simvx.graphics.draw2d_vertex
"""Shared vertex format for the 2D drawing system.
Defines the structured numpy dtype matching the ui.vert shader layout.
"""
import numpy as np
# Vertex format matching ui.vert: pos(vec2) + uv(vec2) + colour(vec4) = 32 bytes
UI_VERTEX_DTYPE = np.dtype(
[
("position", np.float32, 2),
("uv", np.float32, 2),
("colour", np.float32, 4),
]
)