4#include "flint/graphics/pipelines/pipeline-base.h"
6#include <SDL3/SDL_gpu.h>
53 bool initialize(SDL_GPUDevice *device, ShaderFormat shaderFormat,
54 SDL_GPUTextureFormat swapchainFormat);
83 float offsetX = 0.0f,
float offsetY = 0.0f);
102 std::unique_ptr<Shader> m_shader;
Base class for GPU graphics pipelines.
static UIFragmentUniforms buildFragmentUniforms(float r, float g, float b, float a)
Build a UIFragmentUniforms value.
static void setFragmentUniforms(SDL_GPUCommandBuffer *commandBuffer, const UIFragmentUniforms &uniforms)
Upload fragment uniforms (tint color) to the fragment stage.
void cleanup()
Release the pipeline and its shader.
static UIVertexUniforms buildVertexUniforms(float screenWidth, float screenHeight, float offsetX=0.0f, float offsetY=0.0f)
Build a UIVertexUniforms value.
bool initialize(SDL_GPUDevice *device, ShaderFormat shaderFormat, SDL_GPUTextureFormat swapchainFormat)
Create the GPU graphics pipeline with alpha blending enabled.
static void setVertexUniforms(SDL_GPUCommandBuffer *commandBuffer, const UIVertexUniforms &uniforms)
Upload vertex uniforms (screen size and offset) to the vertex stage.
Alpha-blended pipeline for rendering UI elements (text, panels, icons).