Singleton responisble for loading and retrieving textures.
More...
#include <TextureManager.h>
|
static void | LoadTexture (const MapKey &key, const std::string &path) |
| Load Texture with KEY and FILE PATH.
|
|
static void | LoadTexture (const MapKey &key, const unsigned char &red, const unsigned char &green, const unsigned char &blue, const unsigned char &alpha=unsigned char(255)) |
| Load Texture with KEY and RGB VALUE.
|
|
static void | LoadTexture (const MapKey &key, const Vect &color) |
| Load Texture with KEY and VECT.
|
|
static Texture * | GetTexture (const MapKey &key) |
| Returns texture pointer with given KEY.
|
|
static Texture * | GetTexture (DefaultTextures key) |
| Returns texture pointer from DEFAULTTEXTURES.
|
|
|
using | MapKey = std::string |
| KEYS stored as STRINGS.
|
|
Singleton responisble for loading and retrieving textures.
◆ MapKey
◆ DefaultTextures
Collection of Preloaded Textures.
Consists of single color textures as well as an texture for Stitch. <\summary>
Enumerator |
---|
WHITE | |
BLACK | |
RED | |
GREEN | |
BLUE | |
STITCH | |
◆ GetTexture() [1/2]
static Texture * TextureManager::GetTexture |
( |
const MapKey & | key | ) |
|
|
static |
Returns texture pointer with given KEY.
A function that returns a texture pointer based on a user generated key. Checks if key already exists.
- Parameters
-
- Returns
- Texture*
◆ GetTexture() [2/2]
Returns texture pointer from DEFAULTTEXTURES.
A function that returns a texture pointer based on the enum class DefaultTextures.
- Parameters
-
- Returns
- Texture*
◆ LoadTexture() [1/3]
static void TextureManager::LoadTexture |
( |
const MapKey & | key, |
|
|
const std::string & | path ) |
|
static |
Load Texture with KEY and FILE PATH.
A function callable in SlippersResources/LoadResources that takes in a String as a key for retrieval, as well as a file path for a texture existing in Assets/Textures. Checks for repeated key use.
- Parameters
-
◆ LoadTexture() [2/3]
static void TextureManager::LoadTexture |
( |
const MapKey & | key, |
|
|
const unsigned char & | red, |
|
|
const unsigned char & | green, |
|
|
const unsigned char & | blue, |
|
|
const unsigned char & | alpha = unsigned char(255) ) |
|
static |
Load Texture with KEY and RGB VALUE.
A function callable in SlippersResources/LoadResources that takes in a String as a key for retrieval, as well as an R, G, B, and A value to be used to create a single color texture. Checks for repeated key use.
- Parameters
-
◆ LoadTexture() [3/3]
static void TextureManager::LoadTexture |
( |
const MapKey & | key, |
|
|
const Vect & | color ) |
|
static |
Load Texture with KEY and VECT.
A function callable in SlippersResources/LoadResources that takes in a String as a key for retrieval, as well as a vector value to be used to create a single color texture. Checks for repeated key use.
- Parameters
-