Hi, I have the following problem:
I’m drawing spheres with glu.h’s gluSphere function. Everything’s OK, except that I can’t change the spheres colors.
I’ve tried with varius forms of glColor() and no one worked…
This is my function to draw spheres:
GLvoid DibujaEsfera(GLdouble R, GLdouble xpos, GLdouble ypos, GLdouble zpos)
{
GLUquadric *esfera;
esfera = gluNewQuadric();
glTranslated(xpos,ypos,zpos);
glColor4f(1,1,1,1); //here I set the color to white
gluSphere(esfera,R,20,20);
glTranslated(-xpos,-ypos,-zpos);
gluDeleteQuadric(esfera);
}
Why doesn’t it work? Gimme a hand plis, my game looks just too cold without color.
Thanks.