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

Base class for GPU graphics pipelines. More...

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

+ Inheritance diagram for Flint::Pipeline:
+ Collaboration diagram for Flint::Pipeline:

Public Member Functions

 Pipeline (SDL_GPUDevice *device)
 Construct a pipeline bound to device.
 
virtual bool initialize (Shader *shader, const PipelineConfig &config)
 Create the underlying SDL GPU graphics pipeline.
 
void bind (SDL_GPURenderPass *renderPass)
 Bind this pipeline to the active render pass.
 
SDL_GPUGraphicsPipeline * getPipeline () const
 Return the raw SDL GPU graphics pipeline handle.
 
Shader * getShader () const
 Return the shader associated with this pipeline.
 

Protected Member Functions

virtual bool configurePipeline (SDL_GPUGraphicsPipelineCreateInfo &pipelineInfo)
 Subclass hook to customize the pipeline create-info before submission.
 
virtual void cleanup ()
 Release the SDL GPU pipeline object.
 

Protected Attributes

SDL_GPUDevice * m_device = nullptr
 
SDL_GPUGraphicsPipeline * m_pipeline = nullptr
 
Shader * m_shader = nullptr
 

Detailed Description

Base class for GPU graphics pipelines.

Handles the common pipeline-creation boilerplate (vertex input, rasterizer, blending, color target). Subclasses may override configurePipeline() to supply custom vertex-attribute layouts or additional pipeline state before the SDL pipeline object is created.

Definition at line 42 of file pipeline-base.h.


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