CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::RendererGraphicsPipelineManager Class Reference

The renderer graphics pipeline manager that is responsible for managing and re-using GPU graphics pipelines. More...

#include <CeresEngine/Renderer/Resources/RendererGraphicsPipeline.hpp>

Classes

struct  GraphicsPipelineInfo
 

Public Member Functions

 RendererGraphicsPipelineManager (Renderer &renderer)
 Creates a new GraphicsPipeline Manager instance.
 
RendererGraphicsPipelinePtr get (StringView name, const RendererShaderPtr &shader, const GPURenderPassPtr &renderPass, const GPUPipelineLayoutPtr &pipelineLayout=nullptr)
 Gets (or creates) a new RendererGraphicsPipeline from a graphics pipeline state descriptor.
 
RendererGraphicsPipelinePtr get (const RendererShaderPtr &shader, const GPURenderPassPtr &renderPass, const GPUPipelineLayoutPtr &pipelineLayout=nullptr)
 Gets (or creates) a new RendererGraphicsPipeline from a graphics pipeline graphics pipeline program descriptor.
 

Private Member Functions

RendererGraphicsPipelinePtr getOrCreate (StringView name, const RendererShaderPtr &shader, const GPURenderPassPtr &renderPass, const GPUPipelineLayoutPtr &pipelineLayout)
 Gets an existing or creates a new renderer graphics pipeline instance for the given base descriptor.
 
void notifyDestroy (const RendererGraphicsPipeline *graphicsPipeline) noexcept
 Notifies the manager that the renderer graphics pipeline is being destroyed.
 

Private Attributes

RenderermRenderer
 The renderer that owns this manager instance.
 
HashMap< UInt64, GraphicsPipelineInfomGraphicsPipelines
 A map that holds graphics pipeline information for each base graphics pipeline descriptor.
 

Friends

class RendererGraphicsPipeline
 

Detailed Description

The renderer graphics pipeline manager that is responsible for managing and re-using GPU graphics pipelines.

Constructor & Destructor Documentation

◆ RendererGraphicsPipelineManager()

CeresEngine::RendererGraphicsPipelineManager::RendererGraphicsPipelineManager ( Renderer renderer)
explicit

Creates a new GraphicsPipeline Manager instance.

Parameters
rendererThe renderer that owns this manager instance.

Member Function Documentation

◆ get() [1/2]

RendererGraphicsPipelinePtr CeresEngine::RendererGraphicsPipelineManager::get ( const RendererShaderPtr shader,
const GPURenderPassPtr renderPass,
const GPUPipelineLayoutPtr pipelineLayout = nullptr 
)
inline

Gets (or creates) a new RendererGraphicsPipeline from a graphics pipeline graphics pipeline program descriptor.

Parameters
shaderThe shader program that should be used when specializing the graphics pipeline.
renderPassA render pass instance on which the graphics pipeline will be used on.
pipelineLayoutThe pipeline layout object. If nullptr, one will be deduced from the shader and render pass.

◆ get() [2/2]

RendererGraphicsPipelinePtr CeresEngine::RendererGraphicsPipelineManager::get ( StringView  name,
const RendererShaderPtr shader,
const GPURenderPassPtr renderPass,
const GPUPipelineLayoutPtr pipelineLayout = nullptr 
)

Gets (or creates) a new RendererGraphicsPipeline from a graphics pipeline state descriptor.

Parameters
nameA human-readable name to use on the pipeline.
shaderThe shader program that should be used when specializing the graphics pipeline.
renderPassA render pass instance on which the graphics pipeline will be used on.
pipelineLayoutThe pipeline layout object. If nullptr, one will be deduced from the shader and render pass.

◆ getOrCreate()

RendererGraphicsPipelinePtr CeresEngine::RendererGraphicsPipelineManager::getOrCreate ( StringView  name,
const RendererShaderPtr shader,
const GPURenderPassPtr renderPass,
const GPUPipelineLayoutPtr pipelineLayout 
)
private

Gets an existing or creates a new renderer graphics pipeline instance for the given base descriptor.

◆ notifyDestroy()

void CeresEngine::RendererGraphicsPipelineManager::notifyDestroy ( const RendererGraphicsPipeline graphicsPipeline)
privatenoexcept

Notifies the manager that the renderer graphics pipeline is being destroyed.

Friends And Related Symbol Documentation

◆ RendererGraphicsPipeline

Member Data Documentation

◆ mGraphicsPipelines

HashMap<UInt64, GraphicsPipelineInfo> CeresEngine::RendererGraphicsPipelineManager::mGraphicsPipelines
private

A map that holds graphics pipeline information for each base graphics pipeline descriptor.

◆ mRenderer

Renderer& CeresEngine::RendererGraphicsPipelineManager::mRenderer
private

The renderer that owns this manager instance.


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