1GLCOLOR(3G)                                                        GLCOLOR(3G)
2
3
4

NAME

6       glColor3b,  glColor3d,  glColor3f,  glColor3i,  glColor3s,  glColor3ub,
7       glColor3ui, glColor3us,  glColor4b,  glColor4d,  glColor4f,  glColor4i,
8       glColor4s,  glColor4ub, glColor4ui, glColor4us, glColor3bv, glColor3dv,
9       glColor3fv,   glColor3iv,   glColor3sv,    glColor3ubv,    glColor3uiv,
10       glColor3usv,    glColor4bv,    glColor4dv,    glColor4fv,   glColor4iv,
11       glColor4sv, glColor4ubv, glColor4uiv, glColor4usv  -  set  the  current
12       color
13
14

C SPECIFICATION

16       void glColor3b( GLbyte red,
17                       GLbyte green,
18                       GLbyte blue )
19       void glColor3d( GLdouble red,
20                       GLdouble green,
21                       GLdouble blue )
22       void glColor3f( GLfloat red,
23                       GLfloat green,
24                       GLfloat blue )
25       void glColor3i( GLint red,
26                       GLint green,
27                       GLint blue )
28       void glColor3s( GLshort red,
29                       GLshort green,
30                       GLshort blue )
31       void glColor3ub( GLubyte red,
32                        GLubyte green,
33                        GLubyte blue )
34       void glColor3ui( GLuint red,
35                        GLuint green,
36                        GLuint blue )
37       void glColor3us( GLushort red,
38                        GLushort green,
39                        GLushort blue )
40       void glColor4b( GLbyte red,
41                       GLbyte green,
42                       GLbyte blue,
43                       GLbyte alpha )
44       void glColor4d( GLdouble red,
45                       GLdouble green,
46                       GLdouble blue,
47                       GLdouble alpha )
48       void glColor4f( GLfloat red,
49                       GLfloat green,
50                       GLfloat blue,
51                       GLfloat alpha )
52       void glColor4i( GLint red,
53                       GLint green,
54                       GLint blue,
55                       GLint alpha )
56       void glColor4s( GLshort red,
57                       GLshort green,
58                       GLshort blue,
59                       GLshort alpha )
60       void glColor4ub( GLubyte red,
61                        GLubyte green,
62                        GLubyte blue,
63                        GLubyte alpha )
64       void glColor4ui( GLuint red,
65                        GLuint green,
66                        GLuint blue,
67                        GLuint alpha )
68       void glColor4us( GLushort red,
69                        GLushort green,
70                        GLushort blue,
71                        GLushort alpha )
72
73

PARAMETERS

75       red, green, blue
76                       Specify new red, green, and blue values for the current
77                       color.
78
79       alpha           Specifies a new alpha  value  for  the  current  color.
80                       Included only in the four-argument glColor4 commands.
81

C SPECIFICATION

83       void glColor3bv( const GLbyte *v )
84       void glColor3dv( const GLdouble *v )
85       void glColor3fv( const GLfloat *v )
86       void glColor3iv( const GLint *v )
87       void glColor3sv( const GLshort *v )
88       void glColor3ubv( const GLubyte *v )
89       void glColor3uiv( const GLuint *v )
90       void glColor3usv( const GLushort *v )
91       void glColor4bv( const GLbyte *v )
92       void glColor4dv( const GLdouble *v )
93       void glColor4fv( const GLfloat *v )
94       void glColor4iv( const GLint *v )
95       void glColor4sv( const GLshort *v )
96       void glColor4ubv( const GLubyte *v )
97       void glColor4uiv( const GLuint *v )
98       void glColor4usv( const GLushort *v )
99
100

PARAMETERS

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

DESCRIPTION

106       The GL stores both a current single-valued color index  and  a  current
107       four-valued  RGBA  color.   glColor  sets a new four-valued RGBA color.
108       glColor has two major variants: glColor3 and glColor4.  glColor3  vari‐
109       ants  specify  new  red,  green, and blue values explicitly and set the
110       current alpha value to 1.0 (full intensity) implicitly.  glColor4 vari‐
111       ants specify all four color components explicitly.
112
113       glColor3b,  glColor4b,  glColor3s,  glColor4s, glColor3i, and glColor4i
114       take three or four signed byte, short, or long integers  as  arguments.
115       When  v  is appended to the name, the color commands can take a pointer
116       to an array of such values.
117
118       Current color values are stored in floating-point  ,  with  unspecified
119       mantissa  and  exponent sizes.  Unsigned integer color components, when
120       specified, are linearly mapped to floating-point values such  that  the
121       largest representable value maps to 1.0 (full intensity), and 0 maps to
122       0.0 (zero intensity).  Signed integer color components, when specified,
123       are  linearly  mapped to floating-point values such that the most posi‐
124       tive representable value maps to 1.0,  and  the  most  negative  repre‐
125       sentable value maps to -1.0. (Note that this mapping does not convert 0
126       precisely to 0.0.)  Floating-point values are mapped directly.
127
128       Neither floating-point nor signed integer values  are  clamped  to  the
129       range [0,1] before the current color is updated.  However, color compo‐
130       nents are clamped to this range before they are interpolated or written
131       into a color buffer.
132

NOTES

134       The initial value for the current color is (1, 1, 1, 1).
135
136       The  current  color can be updated at any time.  In particular, glColor
137       can be called between a call to glBegin and the corresponding  call  to
138       glEnd.
139

ASSOCIATED GETS

141       glGet with argument GL_CURRENT_COLOR
142       glGet with argument GL_RGBA_MODE
143

SEE ALSO

145       glIndex(3G)
146
147
148
149                                                                   GLCOLOR(3G)
Impressum