AssetManager is a static utility class responsible for loading, caching, and managing textures and meshes across the application.
More...
#include <AssetManager.h>
|
static Texture * | LoadTexture (IRenderer &pRenderer, const std::string &pFileName, const std::string &pName) |
| Loads a texture from file and stores it with a given name.
|
|
static void | LoadTexturesFromFolder (IRenderer &pRenderer, const std::string &pPathName, std::vector< Texture * > &pAllTextures) |
| Loads all textures from a given folder path.
|
|
static Texture * | GetTexture (const std::string &pName) |
| Retrieves a previously loaded texture by name.
|
|
static Mesh * | LoadMesh (const std::string &pFileName, const std::string &pName) |
| Loads a 3D mesh from an .obj file and stores it with a given name.
|
|
static Mesh * | GetMesh (const std::string &pName) |
| Retrieves a previously loaded mesh by name.
|
|
static void | Clear () |
| Frees all loaded assets (textures and meshes).
|
|
AssetManager is a static utility class responsible for loading, caching, and managing textures and meshes across the application.
◆ AssetManager()
◆ Clear()
void AssetManager::Clear |
( |
| ) |
|
|
static |
Frees all loaded assets (textures and meshes).
◆ GetMesh()
Mesh * AssetManager::GetMesh |
( |
const std::string & | pName | ) |
|
|
static |
Retrieves a previously loaded mesh by name.
- Parameters
-
pName | Name associated with the mesh. |
- Returns
- Pointer to the Mesh or nullptr if not found.
◆ GetTexture()
Texture * AssetManager::GetTexture |
( |
const std::string & | pName | ) |
|
|
static |
Retrieves a previously loaded texture by name.
- Parameters
-
pName | Name associated with the texture. |
- Returns
- Pointer to the Texture or nullptr if not found.
◆ LoadMesh()
Mesh * AssetManager::LoadMesh |
( |
const std::string & | pFileName, |
|
|
const std::string & | pName ) |
|
static |
Loads a 3D mesh from an .obj file and stores it with a given name.
- Parameters
-
pFileName | .obj mesh filename (relative to mesh directory). |
pName | Name to associate with the mesh. |
- Returns
- Pointer to the loaded Mesh.
◆ LoadTexture()
Texture * AssetManager::LoadTexture |
( |
IRenderer & | pRenderer, |
|
|
const std::string & | pFileName, |
|
|
const std::string & | pName ) |
|
static |
Loads a texture from file and stores it with a given name.
- Parameters
-
pRenderer | The rendering backend. |
pFileName | Path to the texture file. |
pName | Name to associate with the texture. |
- Returns
- Pointer to the loaded Texture.
◆ LoadTexturesFromFolder()
void AssetManager::LoadTexturesFromFolder |
( |
IRenderer & | pRenderer, |
|
|
const std::string & | pPathName, |
|
|
std::vector< Texture * > & | pAllTextures ) |
|
static |
Loads all textures from a given folder path.
- Parameters
-
pRenderer | The rendering backend. |
pPathName | Folder path containing texture files. |
pAllTextures | Output vector filled with loaded textures. |
◆ operator=()
The documentation for this class was generated from the following files: