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

Batches drawables into sorted geometry, primitive, and custom execution passes for GPURenderer. More...

#include <flint/graphics/render-queue.h>

+ Collaboration diagram for Flint::RenderQueue:

Public Member Functions

 RenderQueue (FrameData &frame, const FloatRect &cameraView)
 Construct a render queue bound to a specific frame stage and camera view.
 
void deferUpload (UploadCallbackFn fn)
 Defer a resource upload operation to execute prior to render pass submission.
 
void quad (GPUTexture *texture, const FloatRect &dst, const FloatRect &srcUV, Color tint, float rotation=0.f, Vec2f origin={0.f, 0.f})
 Emit a textured world-space quad into the ordered geometry stream.
 
void solidQuad (const FloatRect &dst, Color tint, float rotation=0.f, Vec2f origin={0.f, 0.f})
 Emit an untextured, solid-colored world-space quad.
 
void circle (GPUTexture *texture, Vec2f center, float radius, Color tint, float rotation=0.f, float innerRadius=0.f)
 Emit a circular or ring-shape primitive.
 
void lines (std::span< const PrimitiveVertex > verts, PrimitiveType type)
 Emit world-space colored point or line primitives.
 
void custom (CustomDrawFn fn)
 Enqueue a custom rendering callback directly into the execution stream.
 
FloatRect getCameraView () const
 Get the active camera view rectangle bound to this queue.
 

Detailed Description

Batches drawables into sorted geometry, primitive, and custom execution passes for GPURenderer.

Note
A RenderQueue is created for one frame-construction phase and borrows its FrameData and camera view for that phase only.
Warning
Texture and sampler resources referenced by emitted work must remain valid until the frame's GPU commands have completed.
See also
Drawable::emit
GPURenderer::draw

Definition at line 28 of file render-queue.h.


The documentation for this class was generated from the following file: