|
| HlmsTextureManager () |
|
virtual | ~HlmsTextureManager () |
|
void | _changeRenderSystem (RenderSystem *newRs) |
| Called when the RenderSystem changes.
|
|
void | clearTextureMetadataCache (void) |
|
void | createFromTexturePack (const HlmsTexturePack &pack) |
|
TextureLocation | createOrRetrieveTexture (const String &aliasName, const String &texName, TextureMapType mapType, uint32 uniqueSpecialId=0, Image *imgSource=0) |
| See other overload.
|
|
TextureLocation | createOrRetrieveTexture (const String &texName, TextureMapType mapType) |
| Create a texture based on its name.
|
|
void | destroyTexture (IdString aliasName) |
| Destroys a texture.
|
|
void | dumpMemoryUsage (Log *log=NULL) const |
| Dumps to the Ogre log passed as parameter (if NULL, uses the default one) in csv format (separator is '|') the usage statistics of all textures currently loaded by the texture manager.
|
|
void | exportTextureMetadataCache (String &outJson) |
|
const String * | findAliasName (const TextureLocation &textureLocation) const |
| Finds the alias name of a texture given its TextureLocation.
|
|
const String * | findResourceNameFromAlias (IdString aliasName) const |
|
const String * | findResourceNameFromAlias (IdString aliasName, uint32 &outPoolId) const |
| Output outPoolId is left untouched if returned pointer is null.
|
|
TextureLocation | getBlankTexture (void) const |
| Returns the precreated blank texture.
|
|
DefaultTextureParameters * | getDefaultTextureParameters (void) |
|
const HlmsTextureManager::MetadataCacheEntry * | getMetadataCacheEntry (IdString aliasName) const |
| Retrieves an entry in the metadata cache that was loaded via HlmsTextureManager::importTextureMetadataCache.
|
|
HlmsTextureManager::MetadataCacheMap & | getTextureMetadataCache (void) |
|
bool | hasPoolId (uint32 uniqueSpecialId, TextureMapType mapType) const |
|
void | importTextureMetadataCache (const String &filename, const char *jsonString) |
|
void | initialize (void) |
|
void | operator delete (void *ptr) |
|
void | operator delete (void *ptr, const char *, int, const char *) |
|
void | operator delete (void *ptr, void *) |
|
void | operator delete[] (void *ptr) |
|
void | operator delete[] (void *ptr, const char *, int, const char *) |
|
void * | operator new (size_t sz) |
|
void * | operator new (size_t sz, const char *file, int line, const char *func) |
| operator new, with debug line info
|
|
void * | operator new (size_t sz, void *ptr) |
| placement operator new
|
|
void * | operator new[] (size_t sz) |
|
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info
|
|
TexturePtr | reservePoolId (uint32 uniqueSpecialId, TextureMapType mapType, uint32 width, uint32 height, uint16 numSlices, uint8 numMipmaps, PixelFormat pixelFormat, bool isNormalMap, bool hwGammaCorrection) |
| Reserves a specific pool ID with the given parameters and immediately creates that texture.
|
|
void | saveTexture (const HlmsTextureManager::TextureLocation &texLocation, const String &folderPath, set< String >::type &savedTextures, bool saveOitd, bool saveOriginal, uint32 slice, uint32 numSlices, HlmsTextureExportListener *listener) |
| Saves a texture to the given folder.
|
|
HLMS Texture Manager manages textures in the way HLMS expects.
- Most HLMS implementations, when creating a datablock/material with a texture, you can't remove the texture or use a null ptr texture; either you create a new datablock, or use an empty dummy texture. This manager ensures you always get at least a dummy texture.
- Its other main job is to provide UV atlas on the fly and/or texture arrays on the fly. To do that, we group textures into categories: @TEXTURE_TYPE_DIFFUSE @TEXTURE_TYPE_MONOCHROME @TEXTURE_TYPE_NORMALS @TEXTURE_TYPE_ENV_MAP @TEXTURE_TYPE_DETAIL @TEXTURE_TYPE_DETAIL_NORMAL_MAP @TEXTURE_TYPE_NON_COLOR_DATA Different categories have different default parameters. By default all types try to use array textures unless the RenderSystem API doesn't support it (in which case fallbacks to UV atlas).
- For example, Diffuse & detail textures enable hardware gamma correction. Normal maps attempt to use BC5 compression, or uncompress UV8, in that order (depends on HW support). Detail maps default to not using UV atlas when texture arrays aren't supported (because detail maps are often meant to be tileable), etc