PDA

View Full Version : drawing from 256 color scheme



david123
07-03-2007, 09:08 PM
Dear All
Regards!
I want to draw a drawing and want to set the color of the drawing from possible 256 color scheme.
how i set while writting program in opengl, if i want to set a particuler color e.g 40th color scheme from the color array.

help needed in this regard

thanks and regards.
David

ZbuffeR
07-04-2007, 01:56 AM
well, store your 256 RGB colors in an array, and use the 40th color triplet for glColor before you draw.

Even if there is some indexed mode support in OpenGL, it is quite deprecated.

david123
07-04-2007, 02:11 AM
how i set in OpenGL if the 40th index has the RGB value=RGB(255,191,0)in array, can i set it using GLColor3f() or any other function of openGL.
please write these programming lines for me.
kindly guide me, i m a child in OpenGL world.

david123
07-04-2007, 02:13 AM
how i set in OpenGL if the 40th index has the RGB value=RGB(255,191,0)in array, can i set it using GLColor3f() or any other function of openGL.
please write these programming lines for me.
kindly guide me, i m a child in OpenGL world.

ZbuffeR
07-04-2007, 04:56 AM
glColor3ub(255,191,0);