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

Vertex structure for the primary geometry quad pipeline. More...

#include <flint/graphics/types/batch-vertex.h>

+ Collaboration diagram for Flint::BatchVertex:

Public Attributes

Vec2f position
 World-space 2-D vertex coordinates.
 
Vec2f uv
 Normalized texture coordinates in range [0, 1].
 
Color color
 RGBA color tint applied to vertex.
 
Vec2f shapeParams
 Dual-purpose SDF parameters ({radius, innerRadius} or {0, 0}).
 

Detailed Description

Vertex structure for the primary geometry quad pipeline.

Represents a single vertex in the batched geometry stream. Memory alignment is strictly verified by static assertion to ensure a 28-byte stride matching GPU vertex buffer layout declarations.

Field Layout (28 bytes total):

  • position: 2 x float32 = 8 bytes
  • uv: 2 x float32 = 8 bytes
  • color: 4 x uint8 = 4 bytes
  • shapeParams: 2 x float32 = 8 bytes

Dual Use of shapeParams:

  • Procedural SDF Shapes (Circles / Rings): Encodes {radius, innerRadius} in world-space units.
  • Standard Textures / Solid Quads: Set to {0.0f, 0.0f}.

Definition at line 28 of file batch-vertex.h.


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