Radium Engine  1.5.20
Loading...
Searching...
No Matches
ShaderProgramManager.hpp
1#pragma once
2
3#include <Engine/RaEngine.hpp>
4
5#include <map>
6#include <memory>
7#include <string>
8#include <vector>
9
10#include <Core/Utils/Singleton.hpp>
11#include <Core/Utils/StdOptional.hpp>
12
13namespace globjects {
14class File;
15class NamedString;
16} // namespace globjects
17
18namespace Ra {
19namespace Engine {
20namespace Data {
21
22class ShaderProgram;
23class ShaderConfiguration;
24
36class RA_ENGINE_API ShaderProgramManager final
37{
38
39 public:
44 ShaderProgramManager& operator=( const ShaderProgramManager& ) = delete;
45
57 Core::Utils::optional<const Data::ShaderProgram*>
58 addShaderProgram( const Data::ShaderConfiguration& config );
59
65 const Data::ShaderProgram* getShaderProgram( const std::string& id );
66
73 const Data::ShaderProgram* getShaderProgram( const Data::ShaderConfiguration& config );
74
79 void reloadAllShaderPrograms();
85 void reloadNotCompiledShaderPrograms();
86
95 bool addNamedString( const std::string& includepath, const std::string& realfile );
96
101 void reloadNamedString();
102
103 private:
104 void insertShader( const Data::ShaderConfiguration& config,
106
107 private:
110 std::vector<Data::ShaderConfiguration> m_shaderFailedConfs;
111
114 m_namedStrings;
115};
116
117} // namespace Data
118} // namespace Engine
119} // namespace Ra
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3