![]() |
Radium Engine
1.7.0
|
#include <Engine/Data/RawShaderMaterial.hpp>
Inheritance diagram for Ra::Engine::Data::RawShaderMaterial:
Collaboration diagram for Ra::Engine::Data::RawShaderMaterial:Public Member Functions | |
| RawShaderMaterial (const std::string &instanceName, const std::vector< std::pair< Data::ShaderType, std::string > > &shaders, std::shared_ptr< Data::ShaderParameterProvider > paramProvider) | |
| RawShaderMaterial (const RawShaderMaterial &)=delete | |
| Data::RenderParameters & | getParameters () override |
| const Data::RenderParameters & | getParameters () const override |
| void | registerDefaultTechnique () |
| void | updateShaders (const std::vector< std::pair< Data::ShaderType, std::string > > &shaders, std::shared_ptr< Data::ShaderParameterProvider > paramProvider=nullptr) |
| void | updateGL () override final |
Public Member Functions inherited from Ra::Engine::Data::Material | |
| virtual | ~Material ()=default |
| const std::string & | getInstanceName () const |
| const std::string & | getMaterialName () const |
| void | setMaterialAspect (const MaterialAspect &aspect) |
| const MaterialAspect & | getMaterialAspect () const |
| Get the aspect (MAT_OPAQUE or MAT_TRANSPARENT) of the material. | |
| virtual bool | isTransparent () const |
| std::list< std::string > | getPropertyList () const override |
| Get the list of properties the material migh use in a shader. | |
| virtual void | setColoredByVertexAttrib (bool state) |
| Makes the Material take its base color from the VERTEX_COLOR attribute of the rendered geometry. | |
| virtual bool | isColoredByVertexAttrib () const |
| Indicates if the material takes the VERTEX_COLOR attribute into account. | |
| void | needUpdate () |
| Mark the Material as needing update before the next OpenGL call. | |
Public Member Functions inherited from Ra::Engine::Data::ShaderParameterProvider | |
| virtual void | updateFromParameters () |
| Update the attributes of the ShaderParameterProvider to their actual values stored in the renderParameters. | |
Static Public Member Functions | |
| static void | registerMaterial () |
| static void | unregisterMaterial () |
Additional Inherited Members | |
Public Types inherited from Ra::Engine::Data::Material | |
| enum class | MaterialAspect { MAT_OPAQUE , MAT_TRANSPARENT , MAT_DENSITY } |
| Identifies the type of the material. More... | |
Protected Member Functions inherited from Ra::Engine::Data::Material | |
| Material (const std::string &instanceName, const std::string &materialName, MaterialAspect aspect=MaterialAspect::MAT_OPAQUE) | |
| Creates a named material with the given aspect. | |
| void | setMaterialName (std::string newName) |
| Change the material name. | |
| bool | isDirty () |
| Return dirty state. | |
| void | setDirty () |
| Set dirty state to true. | |
| void | setClean () |
| Set dirty state to false. | |
Definition of the Custom Material to compatible with the Radium Management of RenderObjects/GeometryComponents
Definition at line 78 of file RawShaderMaterial.hpp.
|
explicit |
Construct a named material from raw shaders
| instanceName | The name of the material instance |
| shaders | The shaders to use for each pipeline stage (only one source per stage is allowed) |
| paramProvider | The parameter provider for the resulting program |
Definition at line 12 of file RawShaderMaterial.cpp.
Here is the call graph for this function:
|
override |
Definition at line 24 of file RawShaderMaterial.cpp.
|
delete |
RawShaderMaterial is not copyable
|
inlineoverridevirtual |
Override of the const getParameters() const method from Material
Reimplemented from Ra::Engine::Data::ShaderParameterProvider.
Definition at line 169 of file RawShaderMaterial.hpp.
|
inlineoverridevirtual |
Override of the getParameters() method from Material
Reimplemented from Ra::Engine::Data::ShaderParameterProvider.
Definition at line 165 of file RawShaderMaterial.hpp.
| void Ra::Engine::Data::RawShaderMaterial::registerDefaultTechnique | ( | ) |
Register shader configuration and the ForwardRenderer (default) technique for this instance
Definition at line 38 of file RawShaderMaterial.cpp.
Here is the call graph for this function:
|
static |
Register the material in the material library. After registration, the material could be instantiated by any Radium system, renderer, plugin, ...
Definition at line 63 of file RawShaderMaterial.cpp.
Here is the call graph for this function:
|
static |
Remove the material from the material library. After removal, the material is no more available, ...
Definition at line 69 of file RawShaderMaterial.cpp.
Here is the call graph for this function:
|
finaloverridevirtual |
Update the openGL state of the material. This state also consist in updating the parameter provider of the Material
Implements Ra::Engine::Data::ShaderParameterProvider.
Definition at line 73 of file RawShaderMaterial.cpp.
| void Ra::Engine::Data::RawShaderMaterial::updateShaders | ( | const std::vector< std::pair< Data::ShaderType, std::string > > & | shaders, |
| std::shared_ptr< Data::ShaderParameterProvider > | paramProvider = nullptr ) |
Update the shaders of the material.
| instanceName | The name of the material instance |
| shaders | The shaders to use for each pipeline stage (only one source per stage is allowed) |
| paramProvider | The parameter provider for the resulting program. If not given, the old provider will be kept. |
Definition at line 78 of file RawShaderMaterial.cpp.
Here is the call graph for this function: