| 125 | } |
| 126 | |
| 127 | void GFXTextureManager::kill() |
| 128 | { |
| 129 | AssertFatal( mTextureManagerState != GFXTextureManager::Dead, "Texture Manager already killed!" ); |
| 130 | |
| 131 | // Release everything in the cache we can |
| 132 | // so we don't leak any textures. |
| 133 | cleanupCache(); |
| 134 | |
| 135 | GFXTextureObject *curr = mListHead; |
| 136 | GFXTextureObject *temp; |
| 137 | |
| 138 | // Actually delete all the textures we know about. |
| 139 | while( curr != NULL ) |
| 140 | { |
| 141 | temp = curr->mNext; |
| 142 | curr->kill(); |
| 143 | curr = temp; |
| 144 | } |
| 145 | |
| 146 | mCubemapTable.clear(); |
| 147 | |
| 148 | mTextureManagerState = GFXTextureManager::Dead; |
| 149 | } |
| 150 | |
| 151 | void GFXTextureManager::zombify() |
| 152 | { |