Texture console now shows number of 'cached' raw images.

png loading now immediately dumps allocated data on failure
This commit is contained in:
Shyotl
2011-04-07 03:16:11 -05:00
parent 6e437d4188
commit 3a3805fd18
6 changed files with 44 additions and 7 deletions

View File

@@ -243,6 +243,24 @@ protected:
public:
static S32 sGlobalRawMemory;
static S32 sRawImageCount;
static S32 sRawImageCachedCount;
S32 mCacheEntries;
void setInCache(bool in_cache)
{
if(in_cache)
{
if(!mCacheEntries)
sRawImageCachedCount++;
mCacheEntries++;
}
else if(mCacheEntries)
{
mCacheEntries--;
if(!mCacheEntries)
sRawImageCachedCount--;
}
}
};
// Compressed representation of image.