| 715 | } |
| 716 | |
| 717 | Texture2D* TextureCache::getTextureForKey(std::string_view textureKeyName) const |
| 718 | { |
| 719 | auto it = _textures.find(textureKeyName); |
| 720 | |
| 721 | if (it == _textures.end()) |
| 722 | { |
| 723 | auto key = FileUtils::getInstance()->fullPathForFilename(textureKeyName); |
| 724 | it = _textures.find(key); |
| 725 | } |
| 726 | |
| 727 | if (it != _textures.end()) |
| 728 | return it->second; |
| 729 | return nullptr; |
| 730 | } |
| 731 | |
| 732 | std::string TextureCache::getTextureFilePath(ax::Texture2D* texture) const |
| 733 | { |