virtual ZRESULT setMaterial(long nIndex, rend::IMaterial* pMaterial)=0;

Description

Sets material at given zero-based index.

Index of material should not be out of range. You should use insertMaterial method to add new materials in such a case.

This method will raise EVENT_MATERIAL_CHANGE event.

Parameters:
nIndex
Zero-based index of material to set.
pMat
Pointer to rend::IMaterial interface. Not NULL.
See Also:
Interface overview and methods
getMaterial method
insertMaterial method
rend::IMaterial interface