RwSetPolygonTexture(RwPolygon3d *polygon, RwTexture *texture);
Sets the texture of the polygons material.
polygon Pointer to the polygon.
texture Pointer to the texture.
The argument polygon if successful, and NULL otherwise.
NULL may be passed as the second argument to remove the polygons materials texture.
RenderWare optimizes memory usage by sharing materials across multiple polygons. Setting a polygon material property with this function will cause the polygon to have its own copy of the material, not shared by any other polygons. Unless this is the desired effect, it is more memory efficient to use the corresponding material function RwSetMaterialTexture() to change the underlying polygon material. This change will then be propagated to all polygons which use the material. The following line of code demonstrates how this is achieved: