Material manager. Handles material creation, storage, and deletion.
More...
#include <matManager.h>
Material manager. Handles material creation, storage, and deletion.
◆ createMaterial() [1/3]
| MatHandle MaterialManager::createMaterial |
( |
| ) |
|
Create a default material NOTE: DO NOT call delete on returned pointer. The associated texture will be automatically deleted when the loader goes out of scope.
- Returns
- A handle to the new material
◆ createMaterial() [2/3]
| MatHandle Aire::MaterialManager::createMaterial |
( |
std::string & | diffusePath, |
|
|
std::string & | specularPath, |
|
|
std::string & | normalPath, |
|
|
std::string & | heightPath, |
|
|
bool | isflipped ) |
Create a custom new material NOTE: DO NOT call delete on returned pointer. The associated texture will be automatically deleted when the loader goes out of scope.
- Parameters
-
| diffusePath | Path to the diffuse texture |
| specularPath | Path to the specular texture |
| normalPath | Path to the normal texture |
| heightPath | Path to a heightmap texture |
| isFlipped | True if the textures should be vertically flipped on load |
- Returns
- A handle to the new material
◆ createMaterial() [3/3]
| MatHandle Aire::MaterialManager::createMaterial |
( |
std::string | Name | ) |
|
Create a default material identified by a custom name NOTE: DO NOT call delete on returned pointer. The associated texture will be automatically deleted when the loader goes out of scope.
- Parameters
-
| Name | The name to associate with the new material |
- Returns
- A handle to the new material
◆ freeMaterialInCPU()
| void Aire::MaterialManager::freeMaterialInCPU |
( |
MaterialPtr & | mat | ) |
|
Remove a material object from CPU memory
- Parameters
-
| mat | Pointer to the material |
◆ freeMaterialInGPU()
| void Aire::MaterialManager::freeMaterialInGPU |
( |
MaterialPtr & | mat | ) |
|
Remove a material object from GPU memory
- Parameters
-
| mat | Pointer to the material |
◆ getMaterialPtr()
| MaterialPtr Aire::MaterialManager::getMaterialPtr |
( |
MatHandle & | handle | ) |
|
Get pointer to a given material identified by a handle
- Parameters
-
| handle | Handle to a material object |
- Returns
- A pointer to the material referenced by the handle
◆ getMaterialPtrByName()
| MaterialPtr Aire::MaterialManager::getMaterialPtrByName |
( |
std::string & | name | ) |
|
Get pointer to a material identified by a name
- Parameters
-
| name | The name of the material to query for |
- Returns
- A pointer to the material identified with the name
◆ setMatererialInGPU()
| void Aire::MaterialManager::setMatererialInGPU |
( |
MaterialPtr & | mat | ) |
|
Send the material to GPU memory
- Parameters
-
| mat | Pointer to the material |
The documentation for this class was generated from the following files:
- source/res-management/matManager.h
- source/res-management/matManager.cpp