|
Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine. GitHub | Vesper Updates | Creator |
A library for managing and storing textures. More...
#include <Texture.h>
Public Member Functions | |
| void | Add (const std::string &name, const Ref< Texture2D > &texture) |
| Adds a texture to the library with the specified name. | |
| void | Add (const Ref< Texture2D > &texture) |
| Adds a texture to the library using its own 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. | |
| Ref< Texture2D > | Get (const std::string &name) const |
| Retrieves a texture from the library by name. | |
| bool | Exists (const std::string &name) const |
| Checks if a texture with the specified name exists in the library. | |
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.
| bool Vesper::TextureLibrary::Exists | ( | const std::string & | name | ) | const |
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 > Vesper::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.