Manages the loading, retrieval, and deletion of ShaderObject objects.
More...
#include <ShaderManager.h>
|
static ShaderObject * | Get (const std::string &key) |
| Retrieves a ShaderObject object by its key.
|
|
static void | Load (const std::string &key, const std::string &path) |
| Loads a ShaderObject object from a file path.
|
|
|
static const std::string | defaultSpriteShaderKey = AssetDefaults::DefaultSpriteShaderKey |
| Default key for sprite shaders.
|
|
|
| ShaderManager (const ShaderManager &)=delete |
|
ShaderManager & | operator= (const ShaderManager &)=delete |
|
void | privDelete () |
|
ShaderObject * | privGet (const std::string &key) |
|
void | privLoad (const std::string &key, const std::string &path) |
|
|
static ShaderManager & | Instance () |
|
static void | Delete () |
| Deletes all managed ShaderObject objects.
|
|
|
const std::string | defaultPath |
| Default path for loading shaders.
|
|
std::map< std::string, ShaderObject * > | storageMap |
| Map storing ShaderObject objects associated with their keys.
|
|
|
static ShaderManager * | ptrInstance = nullptr |
|
static const std::string | defaultShaderKey = AssetDefaults::DefaultShaderKey |
| Default key for shaders.
|
|
|
class | ShaderManagerAttorney |
|
Manages the loading, retrieval, and deletion of ShaderObject objects.
The ShaderManager class is responsible for managing ShaderObject objects, including loading shaders from files, retrieving shaders by key, and deleting all managed shaders. It follows the Singleton design pattern.
◆ Get()
static ShaderObject * ShaderManager::Get |
( |
const std::string & | key | ) |
|
|
inlinestatic |
Retrieves a ShaderObject object by its key.
- Parameters
-
key | The key associated with the ShaderObject object. |
- Returns
- A pointer to the ShaderObject object, or nullptr if the key is not found.
◆ Load()
static void ShaderManager::Load |
( |
const std::string & | key, |
|
|
const std::string & | path ) |
|
inlinestatic |
Loads a ShaderObject object from a file path.
- Parameters
-
key | The key to associate with the ShaderObject object. |
path | The file path to load the shader from. |
The documentation for this class was generated from the following files: