PDA

View Full Version : Color rendering problem



kangarooxy
03-30-2003, 11:13 PM
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?

kehziah
03-31-2003, 12:50 AM
Using glColorMaterial could be one solution. Not too sure about what you're trying to achieve though.

Regards.

kangarooxy
03-31-2003, 01:12 AM
Originally posted by kehziah:
Using glColorMaterial could be one solution. Not too sure about what you're trying to achieve though.

Regards.

Thanks very much and it helps! Many thanks!