|
Nymph Game Engine
Chaiscript based Game Engine
|
Class for texture manager. More...
#include <texture_manager.h>
Public Member Functions | |
| TextureManager () | |
| TextureManager constructor. More... | |
| ~TextureManager () | |
| Destroys the object. More... | |
| bool | loadTexture (const std::string &path) |
| Loads a texture. More... | |
| std::shared_ptr< BaseTexture > | operator[] (const std::string &name) const |
| Get's texture with name. More... | |
| std::shared_ptr< BaseTexture > | getTexture (const std::string &name) const |
| Gets the texture. More... | |
| bool | textureExists (const std::string &name) const noexcept |
| Function to see if texture with name exists. More... | |
Static Public Member Functions | |
| static std::string | getNameFromPath (const std::string &path) noexcept |
| Gets the name from path. More... | |
Class for texture manager.
| Graphics::TextureManager::TextureManager | ( | ) |
TextureManager constructor.
| Graphics::TextureManager::~TextureManager | ( | ) |
Destroys the object.
|
staticnoexcept |
Gets the name from path.
| [in] | path | The path |
Referenced by loadTexture().
| std::shared_ptr< BaseTexture > Graphics::TextureManager::getTexture | ( | const std::string & | name | ) | const |
Gets the texture.
| [in] | name | The name |
Referenced by generated::getTextureManagerModule(), and operator[]().
| bool Graphics::TextureManager::loadTexture | ( | const std::string & | path | ) |
Loads a texture.
| [in] | path | The path |
References getNameFromPath().
Referenced by generated::getTextureManagerModule().
| std::shared_ptr< BaseTexture > Graphics::TextureManager::operator[] | ( | const std::string & | name | ) | const |
|
noexcept |
Function to see if texture with name exists.
| [in] | name | The name |
Referenced by generated::getTextureManagerModule().