|
Muto 0.0.1
|
A library for managing and storing textures. More...
#include <Texture.h>
Public Member Functions | |
| void | Add (const Ref< Texture2D > &texture) |
| Adds a texture to the library using its own name. | |
| void | Add (const std::string &name, const Ref< Texture2D > &texture) |
| Adds a texture to the library with the specified name. | |
| bool | Exists (const std::string &name) const |
| Checks if a texture with the specified name exists in the library. | |
| Ref< Texture2D > | Get (const std::string &name) const |
| Retrieves a texture from the library by name. | |
| Ref< Texture2D > | Load (const std::string &filepath) |
| Loads a texture from the specified filepath and adds it to the library. | |
| Ref< Texture2D > | Load (const std::string &name, const std::string &filepath) |
| Loads a texture from the specified filepath and adds it to the library with the given name. | |
Private Attributes | |
| std::unordered_map< std::string, Ref< Texture2D > > | m_Textures |
A library for managing and storing textures.
No current serialization implemented.
Adds a texture to the library using its own name.
Adds a texture to the library with the specified name.
Checks if a texture with the specified name exists in the library.
Retrieves a texture from the library by name.
Loads a texture from the specified filepath and adds it to the library.
| Ref< Texture2D > Muto::TextureLibrary::Load | ( | const std::string & | name, |
| const std::string & | filepath | ||
| ) |
Loads a texture from the specified filepath and adds it to the library with the given name.