Clearcolor

The ClearColor function specifies clear values for the color buffers.

ClearColor( red, green, blue, alpha );

Arguments                        red, green, blue, alpha

The red, green, blue, and alpha values used when the color buffers are cleared. The default values are all zero.   These values should be between 0 and 1.

For example, the sky blue default background for the viewport is given by:

glDraw {

ClearColor(.549, .776, 1, 1);

glClear(GL_COLOR_BUFFER_BIT);

}

After this call, refresh the screen to view actors.

The Screen may be set to yellow using

glDraw {

ClearColor(1,1,0, 1);

glClear(GL_COLOR_BUFFER_BIT);

}

Remarks

The ClearColor function specifies the red, green, blue, and alpha values used by Clear to clear the color buffers. Values specified by ClearColor are clamped to the range [0,1].

Note:  Do not call ClearColor between a call to Begin and the corresponding call to End.

See Also

Begin

glClear

End