#include <ShaderManager.h>
|
static ShaderObject * | Get (std::string key) |
| Gets a shader object* using the given key. More...
|
|
static void | Load (std::string key, const char *path) |
| Loads the specified shader. More...
|
|
static void | LoadSpriteShader (std::string key) |
| Loads sprite shader with the unique specified key. More...
|
|
|
typedef std::string | MapKey |
| Defines an alias representing the map key. More...
|
|
typedef std::map< MapKey, ShaderObject * > | StorageMap |
| Defines an alias representing the storage map. More...
|
|
|
std::string | defaultPath |
| The default path that Shaders are stored. More...
|
|
std::map< std::string, ShaderObject * > | shaderMap |
| A map containing shaders specified by a string key. More...
|
|
◆ MapKey
Defines an alias representing the map key.
◆ StorageMap
Defines an alias representing the storage map.
◆ ShaderManager() [1/3]
ShaderManager::ShaderManager |
( |
| ) |
|
|
private |
◆ ShaderManager() [2/3]
◆ ShaderManager() [3/3]
◆ ~ShaderManager()
ShaderManager::~ShaderManager |
( |
| ) |
|
|
privatedefault |
◆ Delete()
static void ShaderManager::Delete |
( |
| ) |
|
|
inlinestaticprivate |
Deletes pointer instance. To be called within Engine code only.
◆ Get()
static ShaderObject * ShaderManager::Get |
( |
std::string |
key | ) |
|
|
inlinestatic |
Gets a shader object* using the given key.
- Parameters
-
- Returns
- Assertion if it fails, else a pointer to a ShaderObject.
◆ Instance()
◆ Load()
static void ShaderManager::Load |
( |
std::string |
key, |
|
|
const char * |
path |
|
) |
| |
|
inlinestatic |
Loads the specified shader.
- Parameters
-
key | The key. |
path | Partial pathname of the file. |
◆ LoadSpriteShader()
static void ShaderManager::LoadSpriteShader |
( |
std::string |
key | ) |
|
|
inlinestatic |
Loads sprite shader with the unique specified key.
- Parameters
-
This loading of this sprite shader ensures that no two sprites can load the same shader under the same name. As an example:
myOtherSprite =
new SlySprite(
"Gordon-Freeman");
myOtherSprite =
new SlySprite(
"The-Free-Man");
◆ operator=() [1/2]
◆ operator=() [2/2]
Move assignment operator.
◆ privDelete()
void ShaderManager::privDelete |
( |
| ) |
|
|
private |
Deletes pointer instance. To be called internally only.
◆ privGet()
ShaderObject * ShaderManager::privGet |
( |
std::string |
key | ) |
|
|
private |
Private get.
- Parameters
-
- Returns
- Assertion if it fails, else a pointer to a ShaderObject.
◆ privLoad()
void ShaderManager::privLoad |
( |
std::string |
key, |
|
|
const char * |
path |
|
) |
| |
|
private |
Private load.
- Parameters
-
key | The key. |
path | Partial pathname of the file. |
◆ privLoadSpriteShader()
void ShaderManager::privLoadSpriteShader |
( |
std::string |
key | ) |
|
|
private |
Private load sprite shader.
- Parameters
-
Internal process for loading the sprite shader. Checks the existing map if the key is unique. If it is, the default SpriteShader is loaded and added to the map. Assertion fail otherwise.
◆ ShaderManagerAttorney
Dictates access to ShaderManager's private functions for engine usage.
◆ defaultPath
std::string ShaderManager::defaultPath |
|
private |
The default path that Shaders are stored.
◆ ptrInstance
◆ shaderMap
std::map<std::string, ShaderObject*> ShaderManager::shaderMap |
|
private |
A map containing shaders specified by a string key.
The documentation for this class was generated from the following files: