| 106 | } |
| 107 | |
| 108 | void CTextureCache::DropTextures() |
| 109 | { |
| 110 | MutexLock lock(GetDebugMutex()); |
| 111 | |
| 112 | for( u32 i {}; i < mTextures.size(); ++i) |
| 113 | { |
| 114 | delete mTextures[i]; |
| 115 | } |
| 116 | mTextures.clear(); |
| 117 | for( u32 i {}; i < HASH_TABLE_SIZE; ++i ) |
| 118 | { |
| 119 | mpCacheHashTable[i] = nullptr; |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | #ifdef PROFILE_TEXTURE_CACHE |
| 124 | #define RECORD_CACHE_HIT( a, b ) TextureCacheStat( a, b, mTextures.size() ) |