openGL之API学习(二零九)glColor
Posted hankern
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openGL之API学习(二零九)glColor相关的知识,希望对你有一定的参考价值。
设置图形默认的绘制颜色,opengl3以前使用,opengl4以后不再使用。
void glColor3b( | GLbyte | red, |
| GLbyte | green, |
| GLbyte | blue) ; |
void glColor3s( | GLshort | red, |
| GLshort | green, |
| GLshort | blue) ; |
void glColor3i( | GLint | red, |
| GLint | green, |
| GLint | blue) ; |
void glColor3f( | GLfloat | red, |
| GLfloat | green, |
| GLfloat | blue) ; |
void glColor3d( | GLdouble | red, |
| GLdouble | green, |
| GLdouble | blue) ; |
void glColor3ub( | GLubyte | red, |
| GLubyte | green, |
| GLubyte | blue) ; |
void glColor3us( | GLushort | red, |
| GLushort | green, |
| GLushort | blue) ; |
void glColor3ui( | GLuint | red, |
| GLuint | green, |
| GLuint | blue) ; |
void glColor4b( | GLbyte | red, |
| GLbyte | green, |
| GLbyte | blue, |
| GLbyte | alpha) ; |
void glColor4s( | GLshort | red, |
| GLshort | green, |
| GLshort | blue, |
| GLshort | alpha) ; |
void glColor4i( | GLint | red, |
| GLint | green, |
| GLint | blue, |
| GLint | alpha) ; |
void glColor4f( | GLfloat | red, |
| GLfloat | green, |
| GLfloat | blue, |
| GLfloat | alpha) ; |
void glColor4d( | GLdouble | red, |
| GLdouble | green, |
| GLdouble | blue, |
| GLdouble | alpha) ; |
void glColor4ub( | GLubyte | red, |
| GLubyte | green, |
| GLubyte | blue, |
| GLubyte | alpha) ; |
void glColor4us( | GLushort | red, |
| GLushort | green, |
| GLushort | blue, |
| GLushort | alpha) ; |
void glColor4ui( | GLuint | red, |
| GLuint | green, |
| GLuint | blue, |
| GLuint | alpha) ; |
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.
void glColor3bv( | const GLbyte * | v) ; |
void glColor3sv( | const GLshort * | v) ; |
void glColor3iv( | const GLint * | v) ; |
void glColor3fv( | const GLfloat * | v) ; |
void glColor3dv( | const GLdouble * | v) ; |
void glColor3ubv( | const GLubyte * | v) ; |
void glColor3usv( | const GLushort * | v) ; |
void glColor3uiv( | const GLuint * | v) ; |
void glColor4bv( | const GLbyte * | v) ; |
void glColor4sv( | const GLshort * | v) ; |
void glColor4iv( | const GLint * | v) ; |
void glColor4fv( | const GLfloat * | v) ; |
void glColor4dv( | const GLdouble * | v) ; |
void glColor4ubv( | const GLubyte * | v) ; |
void glColor4usv( | const GLushort * | v) ; |
void glColor4uiv( | const GLuint * | v) ; |
v
Specifies a pointer to an array that contains red, green, blue, and (sometimes) alpha values.
以上是关于openGL之API学习(二零九)glColor的主要内容,如果未能解决你的问题,请参考以下文章
openGL之API学习(二零六)glClientActiveTexture
openGL之API学习(二零七)glTexCoordPointer
openGL之API学习(二零二)glsl的smooth flat
openGL之API学习(二零八)客户端 服务器端 client server
openGL之API学习(二零三)GL_TEXTURE_WRAP_S GL_TEXTURE_WRAP_T
openGL之API学习(二零四)GL_TEXTURE_MIN_FILTER GL_TEXTURE_MAG_FILTER