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

#include <flint/graphics/pipelines/primitives-pipeline.h>

+ Collaboration diagram for Flint::PrimitivePipeline:

Public Member Functions

bool initialize (SDL_GPUDevice *device, ShaderFormat shaderFormat, SDL_GPUTextureFormat swapchainFormat)
 
void bind (SDL_GPURenderPass *renderPass, SDL_GPUPrimitiveType primitiveType) const
 
bool isInitialized () const
 
void cleanup ()
 

Detailed Description

Pipeline for rendering primitives (lines, line strips, points) Manages multiple pipeline variants for different primitive types

Definition at line 15 of file primitives-pipeline.h.

Constructor & Destructor Documentation

◆ ~PrimitivePipeline()

Flint::PrimitivePipeline::~PrimitivePipeline ( )
inline

Definition at line 19 of file primitives-pipeline.h.

Member Function Documentation

◆ bind()

void Flint::PrimitivePipeline::bind ( SDL_GPURenderPass * renderPass,
SDL_GPUPrimitiveType primitiveType ) const
inline

Bind the appropriate pipeline for the given primitive type

Parameters
renderPassActive render pass
primitiveTypeType of primitive to render

Definition at line 38 of file primitives-pipeline.h.

◆ cleanup()

void Flint::PrimitivePipeline::cleanup ( )
inline

Definition at line 69 of file primitives-pipeline.h.

◆ initialize()

bool Flint::PrimitivePipeline::initialize ( SDL_GPUDevice * device,
ShaderFormat shaderFormat,
SDL_GPUTextureFormat swapchainFormat )

Initialize the primitive pipeline with a shader

Parameters
deviceGPU device
shaderShader containing vertex and fragment shaders
swapchainFormatFormat of the swapchain/render target
Returns
true if initialization succeeded

◆ isInitialized()

bool Flint::PrimitivePipeline::isInitialized ( ) const
inline

Definition at line 65 of file primitives-pipeline.h.


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