|
CeresEngine 0.2.0
A game development framework
|
A renderer graphics pipeline. More...
#include <CeresEngine/Renderer/Resources/RendererGraphicsPipeline.hpp>
Public Member Functions | |
| RendererGraphicsPipeline (RendererGraphicsPipelineManager &manager, StringView name, const RendererShaderPtr &shader, const GPURenderPassPtr &renderPass, const GPUPipelineLayoutPtr &pipelineLayout=nullptr) | |
| Creates a new renderer graphics pipeline instance. | |
| ~RendererGraphicsPipeline () | |
| GPUGraphicsPipelinePtr | getPipeline (const RendererGraphicsPipelineSpecialization &specialization) const |
| Gets the compiled graphics pipeline program for the given parameters. | |
| GPUGraphicsPipelinePtr | getPipeline (const GPUGraphicsPipelineState &state, const PrimitiveTopology primitiveTopology=PrimitiveTopology::Triangles, RendererShaderSpecialization shaderSpecialization={}) const |
| Gets the compiled graphics pipeline program for the given parameters. | |
| GPUGraphicsPipelinePtr | getPipeline (VertexDeclaration vertexDeclaration, const GPUGraphicsPipelineState &state, const PrimitiveTopology primitiveTopology=PrimitiveTopology::Triangles, RendererShaderSpecialization shaderSpecialization={}) const |
| Gets the compiled graphics pipeline program for the given parameters. | |
| GPUGraphicsPipelinePtr | getPipeline (const RendererMesh &mesh, const GPUGraphicsPipelineState &state, PrimitiveTopology primitiveTopology=PrimitiveTopology::Triangles, RendererShaderSpecialization shaderSpecialization={}) const |
| Gets the compiled graphics pipeline program suitable for the given mesh. | |
| GPUGraphicsPipelinePtr | getPipeline (const RendererMeshPtr &mesh, const GPUGraphicsPipelineState &state, const PrimitiveTopology primitiveTopology=PrimitiveTopology::Triangles, RendererShaderSpecialization shaderSpecialization={}) const |
| const String & | getName () const noexcept |
| A human-readable name to use on the pipeline. | |
| const GPURenderPassPtr & | getRenderPass () const noexcept |
| Pointer to a RenderPass object. By default null. | |
| const GPUPipelineLayoutPtr & | getPipelineLayout () const noexcept |
| Pointer to an optional pipeline layout for the graphics pipeline. | |
| const RendererShaderPtr & | getShader () const noexcept |
| The shader to be used when creating new GPU Graphics Pipeline instances. | |
Public Member Functions inherited from CeresEngine::RefCounted< RendererGraphicsPipeline > | |
| RefCounted (Args &&... args) | |
Creates a new RefCounted object and constructs a new Deleter by forwarding Args to it. | |
| void | retain () noexcept |
| Retains the object by increment it's reference count by one. | |
| bool | release () noexcept |
| Relases the object by decrementing it's reference count by one. | |
Private Attributes | |
| RendererGraphicsPipelineManager & | mManager |
| The renderer graphics pipeline manager that owns this graphics pipeline object. | |
| String | mName |
| A human-readable name to use on the pipeline. | |
| RendererShaderPtr | mShader |
| The shader to be used when creating new GPU Graphics Pipeline instances. | |
| GPURenderPassPtr | mRenderPass = nullptr |
| Pointer to a RenderPass object. By default null. | |
| GPUPipelineLayoutPtr | mPipelineLayout = nullptr |
| Pointer to an optional pipeline layout for the graphics pipeline. | |
| HashMap< UInt64, GPUGraphicsPipelinePtr > | mPipelines |
| The graphics pipeline programs, indexed by their parameters hash. | |
Friends | |
| class | RendererGraphicsPipelineManager |
A renderer graphics pipeline.
This is similar to a GPUGraphicsPipeline but is managed by the renderer and allows mutation of certain parameters on runtime with automatic specialization by the renderer.
|
explicit |
Creates a new renderer graphics pipeline instance.
| manager | The manager that owns this pipeline object. |
| name | A human-readable name to use on the pipeline. |
| shader | The shader program that should be used when specializing the graphics pipeline. |
| renderPass | A render pass instance on which the graphics pipeline will be used on. |
| pipelineLayout | The pipeline layout object. If empty, one will be deduced from the shader and render pass. |
| CeresEngine::RendererGraphicsPipeline::~RendererGraphicsPipeline | ( | ) |
A human-readable name to use on the pipeline.
|
inline |
Gets the compiled graphics pipeline program for the given parameters.
| state | A descriptor that describes the state of the graphics pipeline that should be managed by the renderer. |
| primitiveTopology | The primitive topology to be used when rendering. |
| shaderSpecialization | A description of the shader specialization to use. |
| GPUGraphicsPipelinePtr CeresEngine::RendererGraphicsPipeline::getPipeline | ( | const RendererGraphicsPipelineSpecialization & | specialization | ) | const |
Gets the compiled graphics pipeline program for the given parameters.
| specialization | The pipeline specialization parameters. |
| GPUGraphicsPipelinePtr CeresEngine::RendererGraphicsPipeline::getPipeline | ( | const RendererMesh & | mesh, |
| const GPUGraphicsPipelineState & | state, | ||
| PrimitiveTopology | primitiveTopology = PrimitiveTopology::Triangles, |
||
| RendererShaderSpecialization | shaderSpecialization = {} |
||
| ) | const |
Gets the compiled graphics pipeline program suitable for the given mesh.
| mesh | The mesh to get a suitable pipeline program for. |
| primitiveTopology | The primitive topology to be used when rendering. |
| state | A descriptor that describes the state of the graphics pipeline that should be managed by the renderer. |
| shaderSpecialization | A description of the shader specialization to use. |
|
inline |
|
inline |
Gets the compiled graphics pipeline program for the given parameters.
| vertexDeclaration | The vertex declaration that matches the rendered mesh. |
| state | A descriptor that describes the state of the graphics pipeline that should be managed by the renderer. |
| primitiveTopology | The primitive topology to be used when rendering. |
| shaderSpecialization | A description of the shader specialization to use. |
|
inlinenoexcept |
Pointer to an optional pipeline layout for the graphics pipeline.
By default null.
|
inlinenoexcept |
Pointer to a RenderPass object. By default null.
|
inlinenoexcept |
The shader to be used when creating new GPU Graphics Pipeline instances.
|
private |
The renderer graphics pipeline manager that owns this graphics pipeline object.
|
private |
A human-readable name to use on the pipeline.
|
private |
Pointer to an optional pipeline layout for the graphics pipeline.
By default null.
|
mutableprivate |
The graphics pipeline programs, indexed by their parameters hash.
|
private |
Pointer to a RenderPass object. By default null.
|
private |
The shader to be used when creating new GPU Graphics Pipeline instances.