RenderWare V2.1

Previous Page Index Next Page

RwBool

RwSetSurfaceTextureExt(char *name, char *maskname);

Description

Sets the current material’s texture to the texture with the given name, The mask raster read from the file given by maskname is applied to the texture.

RwGetNamedTexture() is used to find the texture. If the named texture is found (either in the dictionary stack or in the file system), the current material’s texture is set to the texture found.

RwReadMaskRaster() is used to read the mask raster and RwMaskTexture() is used to apply the mask raster to the texture.

Arguments

name Name of a texture.

maskname Filename of the mask raster.

Return Value

TRUE if successful, and FALSE otherwise.

Comments

The masking of a texture is a destructive operation. All existing and future references to the texture will be affected by the masking operation.

For more information on how the named texture is searched for, see the description of RwGetNamedTexture(). For information on how the mask raster is read see RwReadMaskRaster() and for information on how the mask raster is applied see RwMaskTexture().

This function can only be called within the context of an RwModelBegin()RwModelEnd() block.

See Also

RwGetNamedTexture()

RwMaskTexture()

RwModelBegin()

RwModelEnd()

RwReadMaskRaster()

RwSetMaterialTexture()

RwSetPolygonTexture()

RwSetSurfaceTexture()