Name

glColor4f , glColor4x - set the current color

C Specification

void glColor4f(GLfloat red,
    GLfloat green,
    GLfloat blue,
    GLfloat alpha)

void glColor4x(GLfixed red,
    GLfixed green,
    GLfixed blue,
    GLfixed alpha)

Parameters

red, green, blue, alpha

Specify new red, green, blue, and alpha values for the current color. The initial value is (1, 1, 1, 1).

Description

The GL stores a current four-valued RGBA color. glColor sets a new four-valued RGBA color.

Current color values are stored in fixed-point or floating-point. In case the values are stored in floating-point, the mantissa and exponent sizes are unspecified.

Neither fixed-point nor floating-point values are clamped to the range [0, 1] before the current color is updated. However, color components are clamped to this range before they are interpolated or written into the color buffer.

Copyright

Copyright © 2003-2004 Silicon Graphics, Inc.

This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.

See Also

glColorPointer, glNormal, glMultiTexCoord