[ Previous | Next | Contents | Glossary | Home | Search ]
OpenGL 1.1 for AIX: Reference Manual

glClearColor Subroutine

Purpose

Specifies clear values for the color buffers.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glClearColor(GLclampf Red, GLclampf Green, GLclampf  Blue, GLclampf  Alpha)

Parameters

Red Specifies the red value used when the color buffer is cleared. The default value is 0 (zero).
Green Specifies the green value used when the color buffer is cleared. The default value is 0.
Blue Specifies the blue value used when the color buffer is cleared. The default value is 0.
Alpha Specifies the alpha value used when the color buffer is cleared. The default value is 0.

Description

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

Errors

GL_INVALID_OPERATION The glClearColor subroutine is called between a call to glBegin and the corresponding call to glEnd.

Associated Gets

Associated gets for the glClearColor subroutine are as follows. (See the glGet subroutine for more information.)

glGet with argument GL_COLOR_CLEAR_VALUE.

Files

/usr/include/GL/gl.h Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL.

Related Information

The glBegin or glEnd subroutine, glClear subroutine.

OpenGL Overview.


[ Previous | Next | Contents | Glossary | Home | Search ]