Expand description
Sprite quad assembly. Piggybacks on the text render pass: a plain Sprite is
emitted as a TextDrawCall containing a single quad with the sentinel UV
(u < 0) the text shader interprets as a solid-coloured fill (alpha carried
in v); a Sprite with a texture is emitted with real 0..1 UVs and a
positive vertex mode so the shader samples the sprite’s texture, which
lives in the same atlas pool as the font atlases. Either way, screen-space
rectangles need no pipeline of their own.
Functions§
- build_
sprite_ calls_ into build_sprite_calls, appending onto an existing draw list so a caller assembling a frame from several element groups reuses one buffer (and, in steady state, the pooled geometry of the spent frame it recycled). Afollow_cursorsprite is skipped: it is the cursor pass’s silhouette source (seecursor.rs), not a scene quad.- covers_
canvas - A view-owned sprite that spans the whole reference canvas is a full-screen backdrop (e.g. a menu dim): it is stretched to fill the live window rather than uniform-scaled, and an opaque one hides the scene behind it.