PDA

View Full Version : Need some colors...



moomoo
03-24-2008, 09:26 AM
Hey guys I'm new to this and I need an assortment of colors (in code, where to add the code would be fantastic also), any help would be great... thanks...

-moomoo

Jorufo
03-24-2008, 07:39 PM
Can you be a little clearer? What do you mean you need an assortment of colors? How do you want to use this assortment of colors?

moomoo
03-27-2008, 10:54 PM
Hi thanks for the reply, I just wanted to change the colors of the shapes I've been "trying" to make... <a real noob...lol> This forums really helpful, i can make circles now... ^_^

GeForce
03-27-2008, 11:59 PM
Hi,
Before drawing new shape(geometry) use this glcolor for more http://www.opengl.org/sdk/docs/man/ and give different color values.

GeForce
03-28-2008, 10:52 PM
Hi,
For better understanding,
void Render()
{
/*some code*/
glColor3f(1.0, 0.0, 0.0); //Red color cube
glutSolidCube(2);

glColor3f(0.0, 1.0, 0.0); //green color sphere
glutSolidSphere(2, 10, 10);

glColor3f(0.0, 0.0, 1.0); //Blue color Teapot
glutSolidTeapot(2);

/*some code*/
}
I think this helps You