RenderWare V2.1

Previous Page Index Next Page

RwPolygon3d *

RwSetPolygonGeometrySampling(RwPolygon3d *polygon,
RwGeometrySampling type);

Description

Sets the geometry sampling type of the polygon’s material.

Arguments

polygon Pointer to the polygon.

type The geometry sampling type.

Return Value

The argument polygon if successful, and NULL otherwise.

Comments

The geometry sampling types are:

• rwPOINTCLOUD Render geometry as a cloud of points.

• rwWIREFRAME Render geometry as a wireframe of polygon edges.

• rwSOLID Render geometry as a solid bounded by filled polygons.

RenderWare optimizes memory usage by sharing materials across multiple polygons. Setting a polygon material property with this function will cause the polygon to have it’s 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 RwSetMaterialGeometrySampling() 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:

RwSetMaterialGeometrySampling(
RwGetPolygonMaterial(polygon), type);

See Also

RwGetPolygonGeometrySampling()

RwSetMaterialGeometrySampling()

RwSetPolygonLightSampling()

RwSetSurfaceGeometrySampling()