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); //...