Manages loading and caching of textures.
Definition texture_library.hpp:34
bool exists(const std::string &fpath) const
Check if a texture exists in the cache.
Definition texture_library.cpp:25
std::shared_ptr< renderer::Texture > load(const std::string &fpath)
Load a texture from a file path.
Definition texture_library.cpp:15
size_t size() const
Get the number of cached textures.
Definition texture_library.hpp:89
static TextureLibrary & get_instance()
Get the singleton instance of the TextureLibrary.
Definition texture_library.cpp:10
std::shared_ptr< renderer::Texture > get(const std::string &fpath) const
Retrieve a cached texture.
Definition texture_library.cpp:27
void clear()
Clear the texture cache.
Definition texture_library.cpp:34
Texture class for managing OpenGL textures.