Material.SetTexture

Material.SetTexture method

Sets the texture to specified slot

public void SetTexture(string slotName, TextureBase texture)
ParameterTypeDescription
slotNameStringSlot name.
textureTextureBaseTexture.

Examples

var mat = new LambertMaterial();
var tex = new Texture();
tex.FileName = "diffuse.png";
mat.SetTexture(Material.MapNormal, tex);

See Also