Color rendering problem

if I disable lighting and rendering each vertex, the result is a colorful one, but no light efffect can be rendered.

glPushAttrib(GL_LIGHTING_BIT);
glDisable(GL_LIGHTING);
     glBegin(...)  
glColor3f(...);
     glNormal3f(...);
glVertex3f(...);
     ....
     glEnd();
glPopAttrib();

However if I enable the lighting
even though I assign a color value to each vertex, I can not render the desired solids, only the lighting color takes effect.

What should I do to get the color and the lighting effect?

Using glColorMaterial could be one solution. Not too sure about what you’re trying to achieve though.

Regards.

Originally posted by kehziah:
[b]Using glColorMaterial could be one solution. Not too sure about what you’re trying to achieve though.

Regards.[/b]

Thanks very much and it helps! Many thanks!