#include <TextureManager.h>
|
static Texture * | Get (std::string key) |
| Gets a texture* using the given key. More...
|
|
static void | Load (std::string key, const char *path) |
| Loads the texture. More...
|
|
static void | Load (std::string key, unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
| Loads the specified color texture. More...
|
|
|
typedef std::string | MapKey |
| Defines an alias representing the map key. More...
|
|
typedef std::map< MapKey, Texture * > | StorageMap |
| Defines an alias representing the storage map. More...
|
|
|
std::string | defaultPath |
| The default path that Textures are stored at. More...
|
|
std::map< std::string, Texture * > | textureMap |
| A map containing a list of textures specified by a key string. More...
|
|
◆ MapKey
Defines an alias representing the map key.
◆ StorageMap
Defines an alias representing the storage map.
◆ TextureManager() [1/3]
TextureManager::TextureManager |
( |
| ) |
|
|
private |
◆ TextureManager() [2/3]
◆ TextureManager() [3/3]
◆ ~TextureManager()
TextureManager::~TextureManager |
( |
| ) |
|
|
privatedefault |
◆ Delete()
static void TextureManager::Delete |
( |
| ) |
|
|
inlinestaticprivate |
Deletes the pointer instance. Only to be called internally by Sly.
◆ Get()
static Texture * TextureManager::Get |
( |
std::string |
key | ) |
|
|
inlinestatic |
Gets a texture* using the given key.
- Parameters
-
- Returns
- Assertion if it fails, else a pointer to the Texture.
◆ Instance()
◆ Load() [1/2]
static void TextureManager::Load |
( |
std::string |
key, |
|
|
const char * |
path |
|
) |
| |
|
inlinestatic |
Loads the texture.
- Parameters
-
key | The key. |
path | Partial pathname of the file. |
◆ Load() [2/2]
static void TextureManager::Load |
( |
std::string |
key, |
|
|
unsigned char |
r, |
|
|
unsigned char |
g, |
|
|
unsigned char |
b, |
|
|
unsigned char |
a |
|
) |
| |
|
inlinestatic |
Loads the specified color texture.
- Parameters
-
key | The key. |
r | Red |
g | Green |
b | Blue |
a | Alpha |
◆ operator=() [1/2]
◆ operator=() [2/2]
Move assignment operator.
◆ privDelete()
void TextureManager::privDelete |
( |
| ) |
|
|
private |
Private delete, delete ptrInstance.
◆ privGet()
Texture * TextureManager::privGet |
( |
std::string |
key | ) |
|
|
private |
Priv get.
- Parameters
-
- Returns
- Assertion if it fails, else a pointer to the specified Texture.
◆ privLoad() [1/2]
void TextureManager::privLoad |
( |
std::string |
key, |
|
|
const char * |
path |
|
) |
| |
|
private |
Priv load.
- Parameters
-
key | The key. |
path | Partial pathname of the file. |
◆ privLoad() [2/2]
void TextureManager::privLoad |
( |
std::string |
key, |
|
|
unsigned char |
r, |
|
|
unsigned char |
g, |
|
|
unsigned char |
b, |
|
|
unsigned char |
a |
|
) |
| |
|
private |
Loads the specified color texture.
- Parameters
-
key | The key. |
r | Red |
g | Green |
b | Blue |
a | Alpha |
Loads a texture of the specified color
◆ TextureManagerAttorney
Dictates access to TextureManager's private functions for engine usuage.
◆ defaultPath
std::string TextureManager::defaultPath |
|
private |
The default path that Textures are stored at.
◆ ptrInstance
◆ textureMap
std::map<std::string, Texture*> TextureManager::textureMap |
|
private |
A map containing a list of textures specified by a key string.
The documentation for this class was generated from the following files: