MCPcopy Create free account
hub / github.com/axmolengine/axmol / getTextureForKey

Method getTextureForKey

core/renderer/TextureCache.cpp:717–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715}
716
717Texture2D* 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
732std::string TextureCache::getTextureFilePath(ax::Texture2D* texture) const
733{

Callers 9

getWhiteTextureMethod · 0.95
getDummyTextureMethod · 0.95
getDefaultTextureFunction · 0.80
reloadMethod · 0.80
reloadMethod · 0.80
refreshMeshRenderMethod · 0.80
onEnterMethod · 0.80

Calls 4

getInstanceFunction · 0.85
fullPathForFilenameMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by 3

reloadMethod · 0.64
refreshMeshRenderMethod · 0.64
onEnterMethod · 0.64