Lighting

Have you guys already tryied to add lighting to objects that doesn’t have a texture? I’m trying to do this, and it’s almost working. I would like to be able to change the object color, but I added a glColor3f(withacolor), and the object don’t change it’s color. It is receiving the lighting, but the color don’t change.

Maybe I’m doing something wrong.

Do you know what kind of problem I’m having?

Thank you
Fernando

yeah, when you’re using lighting, you need to use material properties instead of colors.

look up the glMaterial*() functions.

Make sure that you use:
glEnable(GL_COLOR_MATERIAL);
when using lighting.

Originally posted by Fernando:
[b]Have you guys already tryied to add lighting to objects that doesn’t have a texture? I’m trying to do this, and it’s almost working. I would like to be able to change the object color, but I added a glColor3f(withacolor), and the object don’t change it’s color. It is receiving the lighting, but the color don’t change.

Maybe I’m doing something wrong.

Do you know what kind of problem I’m having?

Thank you
Fernando[/b]