|
2D_Game_Engine
|
#include <texturesmanager.hpp>
Public Member Functions | |
| TexturesManager ()=default | |
| ~TexturesManager ()=default | |
| std::pair< uint32_t, std::shared_ptr< Texture > > | GetTexture (const std::string &path, int mag_filter, int min_filter) |
| std::shared_ptr< Texture > | GetTexture (uint32_t id) |
| std::pair< uint32_t, std::shared_ptr< SpriteSheet > > | GetSpriteSheet (const std::string &path, unsigned int tile_width, unsigned int tile_height, int mag_filter, int min_filter) |
| std::shared_ptr< SpriteSheet > | GetSpriteSheet (uint32_t id) |
| void | ReleaseTexture (uint32_t texture_id) |
| void | ReleaseSpriteSheet (uint32_t texture_id) |
| std::pair< uint32_t, std::shared_ptr< Texture > > | UpdateTexture (uint32_t texture_id, const std::string &path, int mag_filter, int min_filter) |
| std::pair< uint32_t, std::shared_ptr< SpriteSheet > > | UpdateSpriteSheet (uint32_t texture_id, const std::string &path, unsigned int tile_width, unsigned int tile_height, int mag_filter, int min_filter) |
Definition at line 21 of file texturesmanager.hpp.
|
default |
|
default |
| std::pair< uint32_t, std::shared_ptr< SpriteSheet > > TexturesManager::GetSpriteSheet | ( | const std::string & | path, |
| unsigned int | tile_width, | ||
| unsigned int | tile_height, | ||
| int | mag_filter, | ||
| int | min_filter ) |
Returns a spritesheet from the parameters given. If the spritesheet is already loaded, it will return the spritesheet and increase the number of copies, otherwise it will load the spritesheet and return it.
Definition at line 32 of file texturesmanager.cpp.
| std::shared_ptr< SpriteSheet > TexturesManager::GetSpriteSheet | ( | uint32_t | id | ) |
Returns a spritesheet from the id given.
Definition at line 49 of file texturesmanager.cpp.
| std::pair< uint32_t, std::shared_ptr< Texture > > TexturesManager::GetTexture | ( | const std::string & | path, |
| int | mag_filter, | ||
| int | min_filter ) |
Returns a texture from the parameters given. If the texture is already loaded, it will return the texture and increase the number of copies, otherwise it will load the texture and return it.
Definition at line 5 of file texturesmanager.cpp.
| std::shared_ptr< Texture > TexturesManager::GetTexture | ( | uint32_t | id | ) |
Returns a texture from the id given.
Definition at line 22 of file texturesmanager.cpp.
| void TexturesManager::ReleaseSpriteSheet | ( | uint32_t | texture_id | ) |
Decreases the number of copies of the spritesheet with the id given. If the number of copies reaches 0, the spritesheet will be deleted.
Definition at line 71 of file texturesmanager.cpp.
| void TexturesManager::ReleaseTexture | ( | uint32_t | texture_id | ) |
Decreases the number of copies of the texture with the id given. If the number of copies reaches 0, the texture will be deleted.
Definition at line 59 of file texturesmanager.cpp.
| std::pair< uint32_t, std::shared_ptr< SpriteSheet > > TexturesManager::UpdateSpriteSheet | ( | uint32_t | texture_id, |
| const std::string & | path, | ||
| unsigned int | tile_width, | ||
| unsigned int | tile_height, | ||
| int | mag_filter, | ||
| int | min_filter ) |
Updates the spritesheet with the id given with the new parameters.
Definition at line 89 of file texturesmanager.cpp.
| std::pair< uint32_t, std::shared_ptr< Texture > > TexturesManager::UpdateTexture | ( | uint32_t | texture_id, |
| const std::string & | path, | ||
| int | mag_filter, | ||
| int | min_filter ) |
Updates the texture with the id given with the new parameters.
Definition at line 83 of file texturesmanager.cpp.