28#include "Utils/CSingleton.h"
29#include "Entity/CEntityPrefab.h"
106 ArrayMaterial&
loadMaterial(
const char* filename,
bool loadTexture,
const std::vector<std::string>& textureFolders);
140 void saveMaterial(
const ArrayMaterial& materials,
const char* filename);
This object class is created to store data in an array of multiple CEntities.
Definition CEntityPrefab.h:38
The object class describes material information such as which shader it's associated with,...
Definition CMaterial.h:84
void removeAndDeleteMaterial(ArrayMaterial &materials, CMaterial *material)
Delete a material from the given material array and also from the internal cache if present.
void unloadMaterial(const char *filename)
Unload and release all materials loaded from a specific file.
CMaterialManager()
Constructor.
ArrayMaterial & loadMaterial(const char *filename, bool loadTexture, const std::vector< std::string > &textureFolders)
Load a material file (.mat or .xml), parse its contents, and return the loaded materials....
void releaseAllMaterials()
Release all loaded and generated materials from memory.
ArrayMaterial initDefaultMaterial(CEntityPrefab *prefab)
Initialize default materials for all meshes in a prefab, creating and assigning basic material data....
void releaseAllMaterials(const char *package)
Release all materials that belong to a specific package.
void exportMaterial(CEntityPrefab *prefab, const char *filename)
Export materials from a prefab (e.g., from a model) to a material file. Extracts shader,...
static std::vector< std::string > getMaterialExts()
Get the list of supported material file extensions.
static bool isMaterialExt(const char *ext)
Check if the given extension is a valid material file extension.
void saveMaterial(const ArrayMaterial &materials, const char *filename)
Save a set of materials to a material file, serializing their parameters, textures,...
void replaceTexture(ITexture *oldTexture, ITexture *newTexture)
Replace all occurrences of an old texture with a new texture in all managed materials.
bool isMaterialLoaded(const char *filename)
Check if a material file has already been loaded and cached.
ArrayMaterial m_listGenerateMaterials
List of generated materials not bound to a file.
Definition CMaterialManager.h:54
std::map< std::string, ArrayMaterial > m_materials
Map of loaded materials by filename.
Definition CMaterialManager.h:51
CMaterial * createAndAddMaterial(ArrayMaterial &materials)
Create a new material and add it to the given material array.
virtual ~CMaterialManager()
Destructor. Releases all loaded and generated materials.
Interface of a Video Driver dependent Texture.
Definition ITexture.h:119
#define DECLARE_SINGLETON(className)
Declare the standard singleton accessors for a class.
Definition CSingleton.h:36
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29