Loading [MathJax]/extensions/tex2jax.js
Radium Engine
1.5.20
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
f
g
i
l
m
n
o
p
q
r
s
t
v
z
Functions
a
c
d
f
g
i
l
m
n
o
p
q
r
s
t
v
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
b
d
f
i
m
s
v
w
Typedefs
a
b
c
f
g
i
k
o
r
s
t
v
Enumerations
Enumerator
Related Symbols
Files
File List
File Members
All
Macros
▼
Radium Engine
►
Radium Basics
►
Radium Concepts
►
Developer manual
►
Licenses
Todo List
Deprecated List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
src
►
Core
▼
Engine
▼
Data
BlinnPhongMaterial.cpp
BlinnPhongMaterial.hpp
DisplayableObject.hpp
DrawPrimitives.cpp
DrawPrimitives.hpp
EnvironmentTexture.cpp
EnvironmentTexture.hpp
LambertianMaterial.cpp
LambertianMaterial.hpp
Material.cpp
Material.hpp
MaterialConverters.cpp
MaterialConverters.hpp
MaterialTextureSet.hpp
Mesh.cpp
Mesh.hpp
PlainMaterial.cpp
PlainMaterial.hpp
RawShaderMaterial.cpp
RawShaderMaterial.hpp
RenderParameters.cpp
RenderParameters.hpp
ShaderConfigFactory.cpp
ShaderConfigFactory.hpp
ShaderConfiguration.cpp
ShaderConfiguration.hpp
ShaderProgram.cpp
ShaderProgram.hpp
ShaderProgramManager.cpp
ShaderProgramManager.hpp
SimpleMaterial.cpp
SimpleMaterial.hpp
stb.cpp
Texture.cpp
Texture.hpp
TextureManager.cpp
TextureManager.hpp
ViewingParameters.hpp
VolumeObject.cpp
VolumeObject.hpp
VolumetricMaterial.cpp
VolumetricMaterial.hpp
►
Rendering
►
Scene
FrameInfo.hpp
OpenGL.hpp
pch.hpp
RadiumEngine.cpp
RadiumEngine.hpp
RaEngine.hpp
►
Gui
►
Headless
►
IO
►
PluginBase
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
ShaderConfigFactory.cpp
1
#include <Engine/Data/ShaderConfigFactory.hpp>
2
3
#include <map>
4
5
#include <Core/Utils/Log.hpp>
6
7
namespace
Ra
{
8
namespace
Engine {
9
namespace
Data {
10
namespace
ShaderConfigurationFactory {
11
12
using namespace
Core::Utils;
// log
13
14
static
std::map<std::string, ShaderConfiguration>
configs;
15
16
void
addConfiguration
(
const
ShaderConfiguration
& config ) {
17
if
( config.getName().
empty
() ) {
18
LOG( logWARNING ) <<
"Empty name in ShaderConfigurationFactory::addConfiguration call. "
19
"Configuration not added"
;
20
return
;
21
}
22
23
auto
found = configs.insert( { config.getName(), config } );
24
if
( !found.second ) {
25
LOG( logDEBUG ) <<
"Configuration "
<< config.getName()
26
<<
" already in ShaderConfigurationFactory. "
27
"Configuration not added"
;
28
return
;
29
}
30
}
16
void
addConfiguration
(
const
ShaderConfiguration
& config ) {
…
}
31
32
bool
removeConfiguration
(
const
std::string
& configName ) {
33
auto
found = configs.find( configName );
34
if
( found != configs.end() ) {
35
configs.erase( found );
36
return
true
;
37
}
38
return
false
;
39
}
32
bool
removeConfiguration
(
const
std::string
& configName ) {
…
}
40
41
Core::Utils::optional<ShaderConfiguration>
getConfiguration
(
const
std::string
& name ) {
42
if
( name.
empty
() ) {
43
LOG( logWARNING ) <<
"Empty name in ShaderConfigurationFactory::getConfiguration call."
;
44
return
{};
45
}
46
47
auto
found = configs.find( name );
48
if
( found != configs.end() ) {
return
found->second; }
49
else
{
return
{}; }
50
}
41
Core::Utils::optional<ShaderConfiguration>
getConfiguration
(
const
std::string
& name ) {
…
}
51
52
}
// namespace ShaderConfigurationFactory
10
namespace
ShaderConfigurationFactory {
…
}
53
}
// namespace Data
54
}
// namespace Engine
55
}
// namespace Ra
std::string
Ra::Engine::Data::ShaderConfiguration
Definition
ShaderConfiguration.hpp:62
std::string::empty
T empty(T... args)
std::map
Ra::Engine::Data::ShaderConfigurationFactory::addConfiguration
void addConfiguration(const ShaderConfiguration &config)
Definition
ShaderConfigFactory.cpp:16
Ra::Engine::Data::ShaderConfigurationFactory::getConfiguration
Core::Utils::optional< ShaderConfiguration > getConfiguration(const std::string &name)
Definition
ShaderConfigFactory.cpp:41
Ra::Engine::Data::ShaderConfigurationFactory::removeConfiguration
bool removeConfiguration(const std::string &configName)
Definition
ShaderConfigFactory.cpp:32
Ra
hepler function to manage enum as underlying types in VariableSet
Definition
Cage.cpp:3
src
Engine
Data
ShaderConfigFactory.cpp
Generated by
1.12.0