#include <Engine/Rendering/RenderTechnique.hpp>
Set of shaders to be used by the renderer to render objects with associated data.
- See also
- Render technique and materials section in the Material management in the Radium Engine documentation
Definition at line 63 of file RenderTechnique.hpp.
◆ addPassProperties()
void Ra::Engine::Rendering::RenderTechnique::addPassProperties |
( |
const std::list< std::string > & |
props, |
|
|
Core::Utils::Index |
pass = Core::Utils::Index {} |
|
) |
| |
Add properties (several #define in the shader) for the given pass
- Parameters
-
props | the properties list, only strings without the #define |
pass | the pass. If left by default, all active passes will get the properties |
Definition at line 71 of file RenderTechnique.cpp.
◆ clearConfiguration()
void Ra::Engine::Rendering::RenderTechnique::clearConfiguration |
( |
Core::Utils::Index |
pass = DefaultRenderingPasses::LIGHTING_OPAQUE | ) |
|
|
inline |
Mark the given not configured.
- Parameters
-
pass | The index of the pass |
Definition at line 269 of file RenderTechnique.hpp.
◆ clearDirty()
void Ra::Engine::Rendering::RenderTechnique::clearDirty |
( |
Core::Utils::Index |
pass = DefaultRenderingPasses::LIGHTING_OPAQUE | ) |
|
|
inline |
Clear the dirty bit for the given pass (openGL state updated)
- Parameters
-
pass | The index of the pass |
Definition at line 257 of file RenderTechnique.hpp.
◆ createDefaultRenderTechnique()
RenderTechnique Ra::Engine::Rendering::RenderTechnique::createDefaultRenderTechnique |
( |
| ) |
|
|
static |
Creates a default technique based on the ForwarRenderer sementic. pass 1 --> Z_PREPASS pass 0 --> LIGHTING_OPAQUE pass 2 --> LIGHTING_TRANSPARENT
- Returns
- the default technique
Definition at line 115 of file RenderTechnique.cpp.
◆ getConfiguration()
const Data::ShaderConfiguration & Ra::Engine::Rendering::RenderTechnique::getConfiguration |
( |
Core::Utils::Index |
pass = DefaultRenderingPasses::LIGHTING_OPAQUE | ) |
const |
|
inline |
Get the configuration of the given pass
- Parameters
-
pass | The index of the pass |
- Returns
- The pass shader configuration
Definition at line 274 of file RenderTechnique.hpp.
◆ getParametersProvider()
const Data::ShaderParameterProvider * Ra::Engine::Rendering::RenderTechnique::getParametersProvider |
( |
Core::Utils::Index |
pass = DefaultRenderingPasses::LIGHTING_OPAQUE | ) |
const |
◆ getShader()
const Data::ShaderProgram * Ra::Engine::Rendering::RenderTechnique::getShader |
( |
Core::Utils::Index |
pass = DefaultRenderingPasses::LIGHTING_OPAQUE | ) |
const |
Get the Data::ShaderProgram associated with the pass
- Parameters
-
pass | The index of the pass |
- Returns
- The pass shader program if the pass is configured, nullptr otherwise.
Definition at line 46 of file RenderTechnique.cpp.
◆ hasConfiguration()
bool Ra::Engine::Rendering::RenderTechnique::hasConfiguration |
( |
Core::Utils::Index |
pass = DefaultRenderingPasses::LIGHTING_OPAQUE | ) |
const |
|
inline |
Test if the given pass was configured
- Parameters
-
pass | The index of the pass |
- Returns
- true if the pass was configured
Definition at line 261 of file RenderTechnique.hpp.
◆ isDirty()
bool Ra::Engine::Rendering::RenderTechnique::isDirty |
( |
Core::Utils::Index |
pass = DefaultRenderingPasses::LIGHTING_OPAQUE | ) |
const |
|
inline |
Test if the given pass is dirty (openGL state not updated)
- Parameters
-
pass | The index of the pass |
- Returns
- Tru if pass must be updated.
Definition at line 245 of file RenderTechnique.hpp.
◆ setConfiguration() [1/2]
void Ra::Engine::Rendering::RenderTechnique::setConfiguration |
( |
const Data::ShaderConfiguration & |
newConfig, |
|
|
Core::Utils::Index |
pass = DefaultRenderingPasses::LIGHTING_OPAQUE |
|
) |
| |
Set the shader configuration for the given pass. m_numActivePass is updated to be the max of all indices that are set this way.
- Parameters
-
newConfig | The pass shader configuration |
pass | The index of the pass to set |
Definition at line 38 of file RenderTechnique.cpp.
◆ setConfiguration() [2/2]
void Ra::Engine::Rendering::RenderTechnique::setConfiguration |
( |
Core::Utils::Index |
pass = DefaultRenderingPasses::LIGHTING_OPAQUE | ) |
|
|
inline |
Mark the given configured.
- Parameters
-
pass | The index of the pass |
Definition at line 265 of file RenderTechnique.hpp.
◆ setDirty()
void Ra::Engine::Rendering::RenderTechnique::setDirty |
( |
Core::Utils::Index |
pass = DefaultRenderingPasses::LIGHTING_OPAQUE | ) |
|
|
inline |
Set the given pass dirty (openGL state not updated)
- Parameters
-
pass | The index of the pass |
Set the given pass dirty (openGL state updated)
- Parameters
-
pass | The index of the pass |
Definition at line 253 of file RenderTechnique.hpp.
◆ setParametersProvider()
void Ra::Engine::Rendering::RenderTechnique::setParametersProvider |
( |
std::shared_ptr< Data::ShaderParameterProvider > |
provider, |
|
|
Core::Utils::Index |
pass = Core::Utils::Index( -1 ) |
|
) |
| |
Set the shader parameter provider for the given pass.
- Note
- all passes must be configured first using RenderTechnique::setConfiguration() before setting the parameter provider for each pass.
- Parameters
-
provider | The rendering parameter provider |
pass | The index of the pass to set. If this -1, all active passes will share the same provider. |
Definition at line 51 of file RenderTechnique.cpp.
◆ updateGL()
void Ra::Engine::Rendering::RenderTechnique::updateGL |
( |
| ) |
|
The documentation for this class was generated from the following files:
- /home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Engine/Rendering/RenderTechnique.hpp
- /home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Engine/Rendering/RenderTechnique.cpp