| 698 | } |
| 699 | |
| 700 | void TextureCache::removeTextureForKey(std::string_view textureKeyName) |
| 701 | { |
| 702 | auto it = _textures.find(textureKeyName); |
| 703 | |
| 704 | if (it == _textures.end()) |
| 705 | { |
| 706 | auto key = FileUtils::getInstance()->fullPathForFilename(textureKeyName); |
| 707 | it = _textures.find(key); |
| 708 | } |
| 709 | |
| 710 | if (it != _textures.end()) |
| 711 | { |
| 712 | it->second->release(); |
| 713 | _textures.erase(it); |
| 714 | } |
| 715 | } |
| 716 | |
| 717 | Texture2D* TextureCache::getTextureForKey(std::string_view textureKeyName) const |
| 718 | { |