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

Description

Sets texture layer information presented with struct tTextureLayerInfo. If this argument is missing (NULL), only layer enable/disable flag, specified by bEnabled, is set. 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.

Specifying texture layer indices that belong to parent material is invalid in this method call. Specifying index which is greather or equal to amount of all texture layers is also invalid in this method call; use addTextureLayer method instead. You can determine base index of current 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;
  //... set up info data members...
  pMat->setTextureLayer(nBaseLayer, true, &info);
  //...
Parameters:
nLayer
Zero-based index of texture layer to set. It should be in range of texture indicies which belong to this material only.
bEnabled
Specifies whether this layer should be enabled (true) or disabled (false).
pInfo
Optional argument with complete texture layer parameters presented with struct tTextureLayerInfo.
See Also:
Interface overview and methods
getTextureLayer method
addTextureLayer method
getTextureLayersCount method
struct tTextureLayerInfo