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

◆ configurePipeline()

bool Flint::BatchPipeline::configurePipeline ( SDL_GPUGraphicsPipelineCreateInfo & pipelineInfo)
overrideprotectedvirtual

Configure pipeline vertex layout, shader stages, and blend states.

Attribute Layout (28-byte stride, matching BatchVertex):

  • Attribute 0 (location = 0): Position (FLOAT2, offset 0)
  • Attribute 1 (location = 1): UV (FLOAT2, offset 8)
  • Attribute 2 (location = 2): Color (UBYTE4_NORM, offset 16)
  • Attribute 3 (location = 3): ShapeParams (FLOAT2, offset 20)

Blend State: Configures standard non-premultiplied alpha blending for color target attachments:

  • Source Color Factor: SRC_ALPHA
  • Destination Color Factor: ONE_MINUS_SRC_ALPHA
  • Color Operation: ADD
  • Source Alpha Factor: ONE
  • Destination Alpha Factor: ONE_MINUS_SRC_ALPHA
  • Alpha Operation: ADD
Parameters
pipelineInfoPipeline creation descriptor structure to populate.
Returns
true if configuration succeeded.

Reimplemented from Flint::Pipeline.