|
CeresEngine 0.2.0
A game development framework
|
A renderer shader. More...
#include <CeresEngine/Renderer/Resources/RendererShader.hpp>
Public Member Functions | |
| RendererShader (RendererShaderManager &manager, StringView name, const ShaderPtr &shader) | |
| RendererShader (RendererShaderManager &manager, StringView name, const GPUShaderProgramDescriptor &baseDescriptor) | |
| ~RendererShader () | |
| GPUShaderProgramPtr | getProgram (const RendererShaderSpecialization &specialization) const |
| Gets the compiled shader program for the given parameters. | |
| GPUShaderProgramPtr | getProgram () const |
| Gets the compiled shader program for the given parameters. | |
| const String & | getName () const noexcept |
| A human-readable name for the shader. | |
| const ShaderPtr & | getShader () const noexcept |
| A pointer to the shader resource object that will be used as base for compilation. | |
Public Member Functions inherited from CeresEngine::RefCounted< RendererShader > | |
| 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 | |
| RendererShaderManager & | mManager |
| The renderer shader manager that owns this shader object. | |
| String | mName |
| A human-readable name for the shader. | |
| ShaderPtr | mShader = nullptr |
| A pointer to the shader resource object that will be used as base for compilation. | |
| HashMap< UInt64, GPUShaderProgramPtr > | mPrograms |
| The shader programs, indexed by their parameters hash. | |
Friends | |
| class | RendererShaderManager |
A renderer shader.
This is similar to a GPUShaderProgram but is managed by the renderer and allows mutation of certain parameters on runtime with automatic specialization by the renderer.
|
explicit |
|
explicit |
| CeresEngine::RendererShader::~RendererShader | ( | ) |
A human-readable name for the shader.
Will be displayed on debugging utilities.
|
inline |
Gets the compiled shader program for the given parameters.
| GPUShaderProgramPtr CeresEngine::RendererShader::getProgram | ( | const RendererShaderSpecialization & | specialization | ) | const |
Gets the compiled shader program for the given parameters.
| specialization | The shader specialization parameters. |
A pointer to the shader resource object that will be used as base for compilation.
|
friend |
|
private |
The renderer shader manager that owns this shader object.
|
private |
A human-readable name for the shader.
Will be displayed on debugging utilities.
|
mutableprivate |
The shader programs, indexed by their parameters hash.
A pointer to the shader resource object that will be used as base for compilation.