Can't change color

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.

Hi,

I see no reasons why it does not work. Can you check if your lighting is disabled? If it is enabled, final result depends on many other parameters than vertex color.

And take a look at texturing state - is it disabled as well as lighting? If not - you can get some color from texture (as texture coordinates not calculated it will be uniform color).