virtual ZRESULT getTextureLayer(long nLayer, 
                                bool& bEnabled, 
                                tTextureLayerInfo* pInfo=NULL, 
                                bool* pInherited=NULL)=0;


Provides texture layer information presented with struct tTextureLayerInfo. Layers in material are identified by zero-based index, where parent material layers (if any) comes first. Thus, for example, if parent material has three layers and current material has two layers, then layers with indicies 0, 1, 2 are refer to parent material and indicies 3 and 4 refer to this material layers.

You can determine base index of this material texture layers by subtracting from amount of all texture layers amount of texture layers of this material only:

  //pMat is considered to be valid pointer to rend::IMaterial interface;
  long nBaseLayer = pMat->getTextureLayersCount(true) - pMat->getTextureLayersCount(false);
  //nBaseLayer is an index of first texture layer of pMat interface;
  rend::tTextureLayerInfo info;
  pMat->getTextureLayer(nBaseLayer, info.m_bEnabled, &info);
Index of the layer to obtain. Note, this index includes parent material texture layers (if any).
Ret-val argument specifies whether this layer is enabled. This value is the same as in tTextureLayerInfo::m_bEnabled of pInfo argument (in case you supply pInfo argument).
Optional ret-val argument with texture layer information to obtain presented as struct tTextureLayerInfo.
Optional ret-val address of a variable which will be set to true if provided texture layer was inherited, or false otherwise.
See Also:
Interface overview and methods
setTextureLayer method
getTextureLayersCount method
struct tTextureLayerInfo