Page 300 OpenGL Super Bible! glIndex Purpose Sets the current color index to be used for color operations. Include File Variations void glIndexd(GLdouble c); void glIndexf(GLfloat c); void glIndexi(GLint c); void glIndexs(GLshort c); void glIndexdv(const GLdouble *c); void glIndexfv(const GLfloat *c); void glIndexiv(const GLint *c); void glIndexsv(const GLshort *c); Description This function changes the current color index to the one specified by c. This indexvalue is maintained internally as a floating point number. Parameters The new color index to use for all subsequent operations. *cA pointer to the new color index to use for all subsequent operations. Returns None. Example The following code from the sample program INDEX draws a smoothly shaded triangle. The top of the triangle is set to color index 0 which has been set to zero, and the bottom corners to color index 255 which has been set to bright red. // Draw the triangle glBegin(GL_TRIANGLES); // Darkest Red Apex (black) glIndexi(0); glVertex3f(0.0f,200.0f,0.0f); // Brightest red bottom corners glIndexi(255); glVertex3f(200.0f,-70.0f,0.0f); glVertex3f(-200.0f, -70.0f, 0.0f); glEnd(); See Also glColor
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.
This entry was posted
on Tuesday, July 31st, 2007 at 10:08 pm and is filed under Coldfusion.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.