The engine-owned facade: immediate shapes and text (drawn for one frame) and timed shapes and text (kept for durationSeconds). Thread-safe; append_to() and tick() run on the main thread each frame. Immediate shapes are written straight into the frame list under the mutex; only timed shapes build a buffer of their own (outside the lock). Text is kept as text in two byte arenas (this frame's and the timed one) that keep their capacity, so a steady frame allocates nothing once they have grown, and append_to expands it into lines against the view it is given.
The camera debug text faces, built by the engine's extraction from the main camera each frame. A viewportHeightPixels that is not a positive finite number means there is no view: the text queued for this frame is dropped and counted, and the timed text waits for an append that has a view.
The engine-owned facade: immediate shapes and text (drawn for one frame) and timed shapes and text (kept for durationSeconds). Thread-safe; append_to() and tick() run on the main thread each frame. Immediate shapes are written straight into the frame list under the mutex; only timed shapes build a buffer of their own (outside the lock). Text is kept as text in two byte arenas (this frame's and the timed one) that keep their capacity, so a steady frame allocates nothing once they have grown, and append_to expands it into lines against the view it is given.
Line primitives collected for one frame. Each shape call appends pairs of vertices to the depth-tested or the overlay list; the lists are capped at MAX_DEBUG_VERTICES each (excess is dropped and counted).
How a debug line meets the scene: hidden behind geometry (TESTED) or drawn on top (OVERLAY). A typed argument, so it can never be confused with the facade's duration in the same position.