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

◆ quad()

void Flint::RenderQueue::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.

Consecutive quads using the same texture and sampler may share one indexed draw run. Geometry is never reordered solely to improve batching.

Parameters
textureNon-owning GPUTexture pointer. Must be valid and contain a usable GPU texture through frame execution.
dstDestination rectangle in world-space units.
srcUVNormalized texture rectangle; values are expected in [0, 1].
tintRGBA color multiplied with the sampled texture.
rotationClockwise rotation in radians.
originRotation pivot measured from dst position in world-space units.
Note
The queue copies the generated vertex data immediately; it does not retain references to dst or srcUV.
Warning
The destination position is not automatically adjusted for origin. Higher-level callers such as Sprite perform that adjustment before calling this method.