GLCOLOR


HOME

GLCOLOR

NAME
C SPECIFICATION
PARAMETERS
C SPECIFICATION
PARAMETERS
DESCRIPTION
NOTES
ASSOCIATED GETS
SEE ALSO

NAME

glColor3b, glColor3d, glColor3f, glColor3i, glColor3s, glColor3ub, glColor3ui, glColor3us, glColor4b, glColor4d, glColor4f, glColor4i, glColor4s, glColor4ub, glColor4ui, glColor4us, glColor3bv, glColor3dv, glColor3fv, glColor3iv, glColor3sv, glColor3ubv, glColor3uiv, glColor3usv, glColor4bv, glColor4dv, glColor4fv, glColor4iv, glColor4sv, glColor4ubv, glColor4uiv, glColor4usv − set the current color

C SPECIFICATION

void glColor3b( GLbyte red,

GLbyte green,

GLbyte blue )

void glColor3d( GLdouble red,

GLdouble green,

GLdouble blue )

void glColor3f( GLfloat red,

GLfloat green,

GLfloat blue )

void glColor3i( GLint red,

GLint green,

GLint blue )

void glColor3s( GLshort red,

GLshort green,

GLshort blue )

void glColor3ub( GLubyte red,

GLubyte green,

GLubyte blue )

void glColor3ui( GLuint red,

GLuint green,

GLuint blue )

void glColor3us( GLushort red,

GLushort green,

GLushort blue )

void glColor4b( GLbyte red,

GLbyte green,

GLbyte blue,

GLbyte alpha )

void glColor4d( GLdouble red,

GLdouble green,

GLdouble blue,

GLdouble alpha )

void glColor4f( GLfloat red,

GLfloat green,

GLfloat blue,

GLfloat alpha )

void glColor4i( GLint red,

GLint green,

GLint blue,

GLint alpha )

void glColor4s( GLshort red,

GLshort green,

GLshort blue,

GLshort alpha )

void glColor4ub( GLubyte red,

GLubyte green,

GLubyte blue,

GLubyte alpha )

void glColor4ui( GLuint red,

GLuint green,

GLuint blue,

GLuint alpha )

void glColor4us( GLushort red,

GLushort green,

GLushort blue,

GLushort alpha )

PARAMETERS

red, green, blue

Specify new red, green, and blue values for the current color.

alpha

Specifies a new alpha value for the current color. Included only in the four-argument glColor4 commands.

C SPECIFICATION

void glColor3bv( const GLbyte *v )
void glColor3dv( const GLdouble *v )
void glColor3fv( const GLfloat *v )
void glColor3iv( const GLint *v )
void glColor3sv( const GLshort *v )
void glColor3ubv( const GLubyte *v )
void glColor3uiv( const GLuint *v )
void glColor3usv( const GLushort *v )
void glColor4bv( const GLbyte *v )
void glColor4dv( const GLdouble *v )
void glColor4fv( const GLfloat *v )
void glColor4iv( const GLint *v )
void glColor4sv( const GLshort *v )
void glColor4ubv( const GLubyte *v )
void glColor4uiv( const GLuint *v )
void glColor4usv( const GLushort *v )

PARAMETERS

v

Specifies a pointer to an array that contains red, green, blue, and (sometimes) alpha values.

DESCRIPTION

The GL stores both a current single-valued color index and a current four-valued RGBA color. glColor sets a new four-valued RGBA color. glColor has two major variants: glColor3 and glColor4. glColor3 variants specify new red, green, and blue values explicitly and set the current alpha value to 1.0 (full intensity) implicitly. glColor4 variants specify all four color components explicitly.

glColor3b, glColor4b, glColor3s, glColor4s, glColor3i, and glColor4i take three or four signed byte, short, or long integers as arguments. When v is appended to the name, the color commands can take a pointer to an array of such values.

Current color values are stored in floating-point , with unspecified mantissa and exponent sizes. Unsigned integer color components, when specified, are linearly mapped to floating-point values such that the largest representable value maps to 1.0 (full intensity), and 0 maps to 0.0 (zero intensity). Signed integer color components, when specified, are linearly mapped to floating-point values such that the most positive representable value maps to 1.0, and the most negative representable value maps to −1.0. (Note that this mapping does not convert 0 precisely to 0.0.) Floating-point values are mapped directly.

Neither floating-point nor signed integer 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 a color buffer.

NOTES

The initial value for the current color is (1, 1, 1, 1).

The current color can be updated at any time. In particular, glColor can be called between a call to glBegin and the corresponding call to glEnd.

ASSOCIATED GETS

glGet with argument GL_CURRENT_COLOR
glGet
with argument GL_RGBA_MODE

SEE ALSO

glIndex(3G)



More Linux Commands

manpages/manpath.5.html
manpath(5) - format of the /etc/manpath.config file.........
The manpath configuration file is used by the manual page utilities to assess users manpaths at run time, to indicate which manual page hierarchies (manpaths) a

manpages/XtWarning.3.html
XtWarning(3) - low-level error handlers - Linux manual page
The XtError function has been superceded by XtAppError. The XtSetErrorHandler function has been superceded by XtAppSetErrorHandler. The XtSetWarningHandler func

manpages/glVertex2sv.3gl.html
glVertex2sv(3gl) - specify a vertex - Linux manual page.....
glVertex commands are used within glBegin/glEnd pairs to specify point, line, and polygon vertices. The current color, normal, and texture coordinates are assoc

manpages/asin.3.html
asin(3) - arc sine function (Library - Linux man page)......
The asin() function calculates the principal value of the arc sine of x; that is the value whose sine is x. RETURN VALUE On success, these functions return the

manpages/sqrtl.3.html
sqrtl(3) - square root function (Library - Linux man page)
The sqrt() function returns the nonnegative square root of x. RETURN VALUE On success, these functions return the square root of x. If x is a NaN, a NaN is retu

manpages/killproc.8.html
killproc(8) - Send signals to processes by full path name...
killproc sends signals to all processes that use the specified executable. If no signal name is specified, the signal SIGTERM is sent. If this program is not ca

manpages/gitg.1.html
gitg(1) (Commands - Linux manual page).....................
gitg is a graphical user interface for git. It aims at being a small, fast and convenient tool to visualize the history of git repositories. Besides visualizati

manpages/socketcall.2.html
socketcall(2) - socket system calls - Linux manual page.....
socketcall() is a common kernel entry point for the socket system calls. call determines which socket function to invoke. args points to a block containing the

manpages/getpary.3ncurses.html
getpary(3ncurses) - get curses cursor and window coordinates
The getbegy and getbegx functions return the same data as getbegyx. The getcury and getcurx functions return the same data as getyx. The getmaxy and getmaxx fun

manpages/duplocale.3.html
duplocale(3) duplicate a locale object - Linux manual page
The duplocale() function creates a duplicate of the locale object referred to by locobj. If locobj is LC_GLOBAL_LOCALE, duplocale() creates a locale object cont

manpages/systemd.path.5.html
systemd.path(5) - systemd path configuration files (ManPage)
A unit configuration file whose name ends in .path encodes information about a path monitored by systemd, for path-based activation. This man page lists the con

manpages/sane-xerox_mfp.5.html
sane-xerox_mfp(5) - SANE backend for Xerox Phaser 3200MFP de
The sane-xerox_mfp library implements a SANE (Scanner Access Now Easy) backend that provides access to the following USB and network multifunction-peripheral: P





We can't live, work or learn in freedom unless the software we use is free.