Re: XForms: color index

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 3 Jun 98 06:28:39 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> This might not be related to this group, but I hope somebody could help
> me. In OpenGL function glIndexi(GLint c), how to give a value
> for parameter "c"? How can I find out the value for, for example, YELLOW,
> GREEN?

You can use glutGetColor() to inquire the contents of the logical
colormap and search for the index of the color you want. You can use
glutSetColor() to specifically specify a color.

Refer to the GLUT manual pages and/or Mark Kilgard's _OpenGL
Programming for the X Window System_ for more detail.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/