glLoadIdentity();
glTranslatef(0.0f + deltaA - deltaD, 0.0f + deltaQ - deltaE, 0.0f + deltaW - deltaS);
glRotatef(_rotate_x, 1, 0, 0);
glRotatef(_rotate_y, 0, 1, 0);
glColor3f(1.0f, 0.0f, 0.0f);
glutSolidSphere(20, 15, 15);
If I write the code like this, the red color looks good.
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glLoadIdentity();
glTranslatef(0.0f + deltaA - deltaD, 0.0f + deltaQ - deltaE, 0.0f + deltaW - deltaS);
glRotatef(_rotate_x, 1, 0, 0);
glRotatef(_rotate_y, 0, 1, 0);
glColor3f(1.0f, 0.0f, 0.0f);
glutSolidSphere(20, 15, 15);
glDisable(GL_LIGHTING);
glDisable(GL_LIGHT0);
But if I use a light like this, it's white. What's the reason?
How can I solve this problem?

