|
Monad Engine da02fba2
> Undercity Codex_
|
Path-keyed cache that prevents the same image from being uploaded twice. More...
#include <Texture.h>
Public Member Functions | |
| std::shared_ptr< Texture > | GetOrLoadTexture (const std::string &path) |
| Return a cached texture, loading it from disk on first request. | |
Path-keyed cache that prevents the same image from being uploaded twice.
Owned by the Engine singleton (Engine::GetTextureManager()). Material setup code should always go through this manager rather than Texture::Load() directly, so the same GL texture is reused across multiple materials.
| std::shared_ptr< Texture > mnd::TextureManager::GetOrLoadTexture | ( | const std::string & | path | ) |
Return a cached texture, loading it from disk on first request.
| path | Filesystem path used as the cache key. |
Definition at line 58 of file Texture.cpp.
References mnd::Texture::Load().
Referenced by mnd::ParseGLTFNode().