|
CeresEngine 0.2.0
A game development framework
|
An abstract class that represents a renderer material. More...
#include <CeresEngine/Renderer/RendererMaterial.hpp>
Public Member Functions | |
| RendererMaterial (RendererMaterialManager &manager) | |
| Creates a new renderer material. | |
| virtual | ~RendererMaterial ()=default |
| Virtual defaulted destructor. | |
| virtual void | prepare (RendererContext &context)=0 |
| Prepares the material for the rendering of the current frame. | |
| virtual void | fillResourceSetDescriptor (GPUShaderResourceSetBindings &bindings) const =0 |
Fills a ReflectedResourceSetDescriptor with the material parameters. | |
| virtual const GPUShaderProgramPtr & | getShaderProgram () const =0 |
| Gets the shader program used by the material. | |
| virtual const GPUUniformBuffer & | getUniformBuffer () const =0 |
| Returns the uniform buffer that holds material parameters. | |
| virtual const GPUResourceSetPtr & | getResourceSet () const =0 |
| Returns the ResourceSet that holds material parameters. | |
| virtual GPUResourceSetDescriptor | getResourceSetDescriptor () const =0 |
| Returns the ResourceSet bindings that holds material parameters. | |
| UInt32 | getID () const noexcept |
| A unique ID that can be used to uniquely identify the material in the bindless material resource set. | |
| bool | isDirty () const noexcept |
| void | markAsDirty () noexcept |
| virtual void | bind (GPUCommandBuffer &commandBuffer)=0 |
Protected Attributes | |
| RendererMaterialManager & | mManager |
| The material manager that owns and manages this material instance. | |
| Renderer & | mRenderer |
| The renderer that owns the material. | |
| UInt32 | mID = ~0u |
| A unique ID that can be used to uniquely identify the material in the bindless material resource set. | |
| bool | mDirty = true |
Private Member Functions | |
| void | setID (const UInt32 id) noexcept |
| A unique ID that can be used to uniquely identify the material in the bindless material resource set. | |
Friends | |
| class | RendererMaterialManager |
An abstract class that represents a renderer material.
|
explicit |
Creates a new renderer material.
|
virtualdefault |
Virtual defaulted destructor.
|
pure virtual |
Implemented in CeresEngine::RendererMaterialPBR.
|
pure virtual |
Fills a ReflectedResourceSetDescriptor with the material parameters.
The parameters are filled by name.
| bindings | The bindings to be filled with material parameters. |
Implemented in CeresEngine::RendererMaterialPBR.
|
inlinenoexcept |
A unique ID that can be used to uniquely identify the material in the bindless material resource set.
|
pure virtual |
Returns the ResourceSet that holds material parameters.
Implemented in CeresEngine::RendererMaterialPBR.
|
pure virtual |
Returns the ResourceSet bindings that holds material parameters.
Implemented in CeresEngine::RendererMaterialPBR.
|
pure virtual |
Gets the shader program used by the material.
Implemented in CeresEngine::RendererMaterialPBR.
|
pure virtual |
Returns the uniform buffer that holds material parameters.
Implemented in CeresEngine::RendererMaterialPBR.
|
inlinenoexcept |
|
inlinenoexcept |
|
pure virtual |
Prepares the material for the rendering of the current frame.
This will update uniform buffers and perform any other necessary operations necessary for rendering. All prepared data must be view independent.
| context | A context struct that contains parameters given by the renderer. |
Implemented in CeresEngine::RendererMaterialPBR.
A unique ID that can be used to uniquely identify the material in the bindless material resource set.
|
friend |
|
protected |
A unique ID that can be used to uniquely identify the material in the bindless material resource set.
|
protected |
The material manager that owns and manages this material instance.
|
protected |
The renderer that owns the material.