Radium Engine  1.5.20
Loading...
Searching...
No Matches
Ra::Engine::Data::ShaderConfigurationFactory Namespace Reference

Functions

void addConfiguration (const ShaderConfiguration &config)
 
bool removeConfiguration (const std::string &configName)
 
Core::Utils::optional< ShaderConfigurationgetConfiguration (const std::string &name)
 

Variables

static std::map< std::string, ShaderConfigurationconfigs
 

Detailed Description

Factory that manage the set of named shader configurations Usefull for the management of shader libraries where a shader configuration (source code, defines, properties) are defined once and reuse multiple time.

Function Documentation

◆ addConfiguration()

RA_ENGINE_API void Ra::Engine::Data::ShaderConfigurationFactory::addConfiguration ( const Data::ShaderConfiguration & config)

Add a configuration to the factory

Note
In case of name collision, the configuration is not added to the factory
Parameters
config

Definition at line 16 of file ShaderConfigFactory.cpp.

+ Here is the call graph for this function:

◆ getConfiguration()

RA_ENGINE_API Core::Utils::optional< Data::ShaderConfiguration > Ra::Engine::Data::ShaderConfigurationFactory::getConfiguration ( const std::string & name)

Get a configuration from the factory

Parameters
nameThe configuration to get
Returns
The configuration if it exists, std::nullopt otherwise

Definition at line 41 of file ShaderConfigFactory.cpp.

+ Here is the call graph for this function:

◆ removeConfiguration()

RA_ENGINE_API bool Ra::Engine::Data::ShaderConfigurationFactory::removeConfiguration ( const std::string & configName)

Remove a configuration from the factory

Parameters
config
Returns
true if the configuration was found and removed, else false

Definition at line 32 of file ShaderConfigFactory.cpp.

Variable Documentation

◆ configs

std::map<std::string, ShaderConfiguration> Ra::Engine::Data::ShaderConfigurationFactory::configs
static

Definition at line 14 of file ShaderConfigFactory.cpp.