IMaterialManager interface provide access to the material manager implemented in 3DEngine. More...
#include 
| Public Types | |
| enum | ELoadingFlags { ELoadingFlagsPreviewMode = BIT(0) } | 
| Loading flags. | |
| Public Member Functions | |
| virtual void | GetMemoryUsage (ICrySizer *pSizer) const =0 | 
| virtual IMaterial * | CreateMaterial (const char *sMtlName, int nMtlFlags=0)=0 | 
| virtual void | RenameMaterial (IMaterial *pMtl, const char *sNewName)=0 | 
| virtual IMaterial * | FindMaterial (const char *sMtlName) const =0 | 
| Finds named material. | |
| virtual IMaterial * | LoadMaterial (const char *sMtlName, bool bMakeIfNotFound=true, bool bNonremovable=false, unsigned long nLoadingFlags=0)=0 | 
| virtual IMaterial * | LoadMaterialFromXml (const char *sMtlName, XmlNodeRef mtlNode)=0 | 
| Loads material from xml. | |
| virtual IMaterial * | CloneMaterial (IMaterial *pMtl, int nSubMtl=-1)=0 | 
| virtual void | CopyMaterial (IMaterial *pMtlSrc, IMaterial *pMtlDest, EMaterialCopyFlags flags)=0 | 
| Copy single material. | |
| virtual IMaterial * | CloneMultiMaterial (IMaterial *pMtl, const char *sSubMtlName=0)=0 | 
| virtual void | SetListener (IMaterialManagerListener *pListener)=0 | 
| virtual IMaterial * | GetDefaultMaterial ()=0 | 
| Retrieve a default engine material. | |
| virtual IMaterial * | GetDefaultTerrainLayerMaterial ()=0 | 
| Retrieve a default engine material for terrain layer. | |
| virtual IMaterial * | GetDefaultLayersMaterial ()=0 | 
| Retrieve a default engine material with material layers presets. | |
| virtual IMaterial * | GetDefaultHelperMaterial ()=0 | 
| Retrieve a default engine material for drawing helpers. | |
| virtual ISurfaceType * | GetSurfaceTypeByName (const char *sSurfaceTypeName, const char *sWhy=NULL)=0 | 
| Retrieve surface type by name. | |
| virtual int | GetSurfaceTypeIdByName (const char *sSurfaceTypeName, const char *sWhy=NULL)=0 | 
| virtual ISurfaceType * | GetSurfaceType (int nSurfaceTypeId, const char *sWhy=NULL)=0 | 
| Retrieve surface type by unique surface type id. | |
| virtual ISurfaceTypeManager * | GetSurfaceTypeManager ()=0 | 
| Retrieve interface to surface type manager. | |
| virtual IMaterial * | LoadCGFMaterial (const char *szMaterialName, const char *szCgfFilename, unsigned long nLoadingFlags=0)=0 | 
| virtual void | GetLoadedMaterials (IMaterial **pData, uint32 &nObjCount) const =0 | 
| For statistics - call once to get the count (pData==0), again to get the data(pData!=0). | |
| virtual void | SetAltMaterialSuffix (const char *pSuffix)=0 | 
| virtual void | RefreshMaterialRuntime ()=0 | 
| Updates material data in the renderer. | |
IMaterialManager interface provide access to the material manager implemented in 3DEngine.
Clone single material or multi sub material.
| nSubMtl | When negative all sub materials of MultiSubMtl are cloned, if positive only specified slot is cloned. | 
Clone MultiSubMtl material.
| sSubMtlName | Name of the sub-material to clone, if NULL all submaterial are cloned. | 
| 
 | pure virtual | 
Creates a new material object and register it with the material manager
| 
 | pure virtual | 
Get IMaterial pointer for a material referenced by a .cgf file.
| nLoadingFlags | Zero, or a bitwise combination of the enum items from ELoadingFlags. | 
| 
 | pure virtual | 
Loads material.
| nLoadingFlags | Zero or a bitwise combination of the values defined in ELoadingFlags. | 
| 
 | pure virtual | 
Rename a material object.
| pMtl | Pointer to a material object. | 
| sNewName | New name to assign to the material. | 
| 
 | pure virtual | 
Sets a suffix that will be appended onto every requested material to try and find an alternative version.
| pSuffix | Set this to null to stop returning alternates. | 
| 
 | pure virtual | 
Associate a special listener callback with material manager inside 3DEngine. This listener callback is used primerly by the editor.