Main | API | WebRender | clearBuffer

Function

clearBuffer(buffer);

Clears the pixel and/or depth buffers.

Parameters

buffer - [Unsigned Integer]

Following values are used to clear different buffers:

0 : Both Buffers

1 : Pixel Buffer

2 : Depth Buffer

Return

Success - [Boolean]

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

Description

This will reset the buffer to their initial state. The pixel buffer will be filled will whatever colour is set in clearColor, and the depth buffer will be set to the furtherest rendering point. If no number is provided, then it is assumed to be 0 and both buffer are cleared.

Additional Notes

None.