Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Engine::Data::ShaderParameterProvider Class Referenceabstract

Shader program parameter provider. More...

#include <Engine/Data/RenderParameters.hpp>

+ Inheritance diagram for Ra::Engine::Data::ShaderParameterProvider:
+ Collaboration diagram for Ra::Engine::Data::ShaderParameterProvider:

Public Member Functions

virtual RenderParametersgetParameters ()
 
virtual const RenderParametersgetParameters () const
 
virtual void updateGL ()=0
 Update the OpenGL states used by the ShaderParameterProvider.
 
virtual void updateFromParameters ()
 Update the attributes of the ShaderParameterProvider to their actual values stored in the renderParameters.
 
virtual std::list< std::stringgetPropertyList () const
 Get the list of properties the provider might use in a shader.
 

Detailed Description

Shader program parameter provider.

A ShaderParameterProvider is an object that is associated to a render technique to provide the uniform parameter set for the program. When an RenderObject is drawn using a given rendertechnique, the ShaderParameterProvider associated to the renderTechnique is responsible to set all the uniforms needed by the rendertechnique.

Definition at line 170 of file RenderParameters.hpp.

Member Function Documentation

◆ getParameters() [1/2]

virtual RenderParameters & Ra::Engine::Data::ShaderParameterProvider::getParameters ( )
inlinevirtual

Reimplemented in Ra::Engine::Data::RawShaderMaterial.

Definition at line 174 of file RenderParameters.hpp.

◆ getParameters() [2/2]

virtual const RenderParameters & Ra::Engine::Data::ShaderParameterProvider::getParameters ( ) const
inlinevirtual

Reimplemented in Ra::Engine::Data::RawShaderMaterial.

Definition at line 175 of file RenderParameters.hpp.

◆ getPropertyList()

virtual std::list< std::string > Ra::Engine::Data::ShaderParameterProvider::getPropertyList ( ) const
inlinevirtual

Get the list of properties the provider might use in a shader.

Each property will be added to the shader used for rendering under the form "#define theProperty" when the provider is associated with the render technique.

The default implementation returns an empty list.

Todo
: Validate this proposal

Reimplemented in Ra::Engine::Data::Material.

Definition at line 199 of file RenderParameters.hpp.

◆ updateFromParameters()

virtual void Ra::Engine::Data::ShaderParameterProvider::updateFromParameters ( )
inlinevirtual

Update the attributes of the ShaderParameterProvider to their actual values stored in the renderParameters.

Reimplemented in Ra::Engine::Data::BlinnPhongMaterial, Ra::Engine::Data::LambertianMaterial, Ra::Engine::Data::PlainMaterial, and Ra::Engine::Data::VolumetricMaterial.

Definition at line 188 of file RenderParameters.hpp.

◆ updateGL()

virtual void Ra::Engine::Data::ShaderParameterProvider::updateGL ( )
pure virtual

Update the OpenGL states used by the ShaderParameterProvider.

These state could be the ones from an associated material (textures, precomputed tables or whatever data associated to the material) or some parameters that are specific to the provider semantic.

Implemented in Ra::Engine::Data::BlinnPhongMaterial, Ra::Engine::Data::RawShaderMaterial, Ra::Engine::Data::SimpleMaterial, Ra::Engine::Data::VolumetricMaterial, and Ra::Gui::Gizmo::UiSelectionControler.


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