Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches

◆ draw()

void Flint::GPURenderer::draw ( const std::function< void(RenderQueue &)> & overlayEmit = {})

Execute all queued draw commands in layer and submission order.

Performs the multi-stage draw execution:

  1. Sorts submitted drawables by DrawLayer.
  2. Constructs a transient RenderQueue bound to FrameData and emits draw geometry.
  3. Closes the initial pass and uploads geometry/line VBOs and IBOs to GPU memory.
  4. Drains all deferred resource upload callbacks (deferUpload).
  5. Re-opens the render pass and dispatches batched geometry, line, and custom draw runs.
  6. Clears commands and resets transient frame data storage.