|
void | removeAllShaderFiles () |
|
void | removeUnusedShaderFiles () |
|
SharedShader | loadShader (const std::string &full_path, unsigned type) |
| Loads a single shader.
|
|
SharedShader | getShaderFile (const std::string &file, unsigned type) |
| Get a shader file.
|
|
|
typedef std::shared_ptr< GLuint > | SharedShader |
|
|
const std::string & | getHeader () |
| Returns a string with the content of header.txt (which contains basic shader defines).
|
|
void | readFile (const std::string &file, std::ostringstream &code, bool not_header=true) |
|
SharedShader | addShaderFile (const std::string &full_path, unsigned type) |
| Loads a single shader file, and add it to the loaded (cached) list.
|
|
|
std::unordered_map< std::string, SharedShader > | m_shader_files_loaded |
| Map from a filename in full path to a shader indentifier.
|
|
|
static ShaderFilesManager * | getInstance () |
| Used to get the instance.
|
|
static void | kill () |
| Used to kill the singleton, if needed.
|
|
| Singleton () |
| Constructor.
|
|
virtual | ~Singleton () |
| Destructor.
|
|
◆ addShaderFile()
ShaderFilesManager::SharedShader ShaderFilesManager::addShaderFile |
( |
const std::string & |
full_path, |
|
|
unsigned |
type |
|
) |
| |
|
private |
Loads a single shader file, and add it to the loaded (cached) list.
- Parameters
-
file | Filename of the shader to load. |
type | Type of the shader. |
◆ getShaderFile()
ShaderFilesManager::SharedShader ShaderFilesManager::getShaderFile |
( |
const std::string & |
file, |
|
|
unsigned |
type |
|
) |
| |
Get a shader file.
If the shader is not already in the cache it will be loaded and cached.
- Parameters
-
file | Filename of the shader to load. |
type | Type of the shader. |
◆ loadShader()
ShaderFilesManager::SharedShader ShaderFilesManager::loadShader |
( |
const std::string & |
full_path, |
|
|
unsigned |
type |
|
) |
| |
Loads a single shader.
This is NOT cached, use addShaderFile for that.
- Parameters
-
file | Filename of the shader to load. |
type | Type of the shader. |
◆ m_shader_files_loaded
std::unordered_map<std::string, SharedShader> ShaderFilesManager::m_shader_files_loaded |
|
private |
Map from a filename in full path to a shader indentifier.
Used for caching shaders.
The documentation for this class was generated from the following files: