#include <TextureManager.h>
|
static int | initialize () |
|
static int | initializeSplash () |
|
static void | shutdown () |
|
static void | clear () |
|
static void | prepare () |
|
static int | numTextures (TextureStorage s=TextureStorage::GAME) |
|
static int | bindTexture (unsigned int n, TextureStorage s) |
| Bind texture to next free texture unit. More...
|
|
static int | loadBufferSlot (unsigned char *image=nullptr, unsigned int width=256, unsigned int height=256, ColorMode mode=ColorMode::RGBA, unsigned int bpp=32, TextureStorage s=TextureStorage::GAME, int slot=-1, bool filter=true) |
| Loads Buffer as texture. More...
|
|
static int | loadImage (std::string filename, TextureStorage s=TextureStorage::GAME, int slot=-1) |
|
static void | addTile (TextureTile *t) |
|
static int | numTiles () |
|
static TextureTile & | getTile (int index) |
|
static void | addAnimatedTile (int index, int tile) |
|
static int | numAnimatedTiles () |
|
static int | getFirstTileAnimation (int index) |
|
static int | getNextTileAnimation (int index, int tile) |
|
static BufferManager * | getBufferManager (int tex, TextureStorage store) |
|
static void | display () |
|
static unsigned int | getTextureID (int n, TextureStorage s) |
|
static void | setPalette (int index, glm::vec4 color) |
|
static glm::vec4 | getPalette (int index) |
|
static void | addIndexedTexture (unsigned char *image, unsigned int width, unsigned int height) |
|
Definition at line 67 of file TextureManager.h.
int TextureManager::initialize |
( |
| ) |
|
|
static |
int TextureManager::initializeSplash |
( |
| ) |
|
|
static |
void TextureManager::shutdown |
( |
| ) |
|
|
static |
void TextureManager::clear |
( |
| ) |
|
|
static |
void TextureManager::prepare |
( |
| ) |
|
|
static |
Bind texture to next free texture unit.
- Parameters
-
n | ID of texture to bind |
s | Place where texture is stored |
- Returns
- ID of GL texture unit to which this texture is bound.
Definition at line 219 of file TextureManager.cpp.
Loads Buffer as texture.
- Parameters
-
image | pixmap matching other params |
width | width of image |
height | height of image |
mode | mode of image |
bpp | bits per pixel of image |
s | Which TextureStorage should be accessed |
slot | slot (ID) of image |
filter | if the texture should be mipmap filtered |
- Returns
- texture ID or < 0 on error
Definition at line 141 of file TextureManager.cpp.
int TextureManager::numTiles |
( |
| ) |
|
|
static |
void TextureManager::addAnimatedTile |
( |
int |
index, |
|
|
int |
tile |
|
) |
| |
|
static |
int TextureManager::numAnimatedTiles |
( |
| ) |
|
|
static |
int TextureManager::getFirstTileAnimation |
( |
int |
index | ) |
|
|
static |
int TextureManager::getNextTileAnimation |
( |
int |
index, |
|
|
int |
tile |
|
) |
| |
|
static |
void TextureManager::display |
( |
| ) |
|
|
static |
void TextureManager::setPalette |
( |
int |
index, |
|
|
glm::vec4 |
color |
|
) |
| |
|
static |
glm::vec4 TextureManager::getPalette |
( |
int |
index | ) |
|
|
static |
void TextureManager::addIndexedTexture |
( |
unsigned char * |
image, |
|
|
unsigned int |
width, |
|
|
unsigned int |
height |
|
) |
| |
|
static |
std::vector< unsigned int > & TextureManager::getIds |
( |
TextureStorage |
s | ) |
|
|
staticprivate |
void TextureManager::bindTextureId |
( |
unsigned int |
n, |
|
|
TextureStorage |
s, |
|
|
unsigned int |
unit |
|
) |
| |
|
staticprivate |
int TextureManager::loadPCX |
( |
std::string |
filename, |
|
|
TextureStorage |
s, |
|
|
int |
slot |
|
) |
| |
|
staticprivate |
std::vector< unsigned int > TextureManager::mTextureIdsGame |
|
staticprivate |
std::vector< unsigned int > TextureManager::mTextureIdsSystem |
|
staticprivate |
std::vector< std::vector< int > > TextureManager::animations |
|
staticprivate |
std::vector< int > TextureManager::gameUnits |
|
staticprivate |
std::vector< int > TextureManager::systemUnits |
|
staticprivate |
unsigned int TextureManager::nextFreeTextureUnit = 0 |
|
staticprivate |
std::array< glm::vec4, 256 > TextureManager::colorPalette |
|
staticprivate |
std::vector< std::tuple< unsigned char *, unsigned int, unsigned int > > TextureManager::indexedTextures |
|
staticprivate |
The documentation for this class was generated from the following files: