Main | API | WebRender | setProperty

Function

setProperty(name, value);

Updates a named property within WebRender with the value given.

Parameters

name - [String]

The name of the property that is being changed. Valid strings: PROP_ENABLE_TRIANGLE_OVERSCAN, PROP_ENABLE_BACKFACECULL, PROP_ENABLE_TRIANGLE_OUTLINE, PROP_ENABLE_Z_BUFFER, PROP_CLEAR_COLOUR.

value - [Variable]

The value that the property is to be set to.

Return

Success - [Boolean]

Returns 0/false if an error is detected, else returns 1/true.

Description

The follwoing are properties that can be modified by with function:

PROP_ENABLE_TRIANGLE_OVERSCAN [Boolean] - Intially set to false. If turned on this will attempt to enlarge each polygon that is drawn. This may be useful if you can see seams between polygons, but will cause clipping problems if always on.

PROP_ENABLE_BACKFACECULL [Boolean] - Initially set to true. If turned on this will enable backface culling in the rendering pipeline. WebRender culls polygons that appear in clockwise order.

PROP_ENABLE_TRIANGLE_OUTLINE [Boolean] - Initially set to false. This is a debugging tool that will draw along the edges of polygons. Useful for cases to see if a polygon is being drawn or not.

PROP_ENABLE_Z_BUFFER [Boolean] - Initially set to true. If turned on, the depth buffer is checked against and updated for each pixel that is drawn.

PROP_CLEAR_COLOUR [Unsigned Integer] - See the convenience function clearColor for more details. This version requires a 32-bit colour value.

Additional Notes

None.