Advertisement

Shading + Lighting = Loss of color?

Started by March 31, 2004 06:34 PM
0 comments, last by Xorcist 20 years, 11 months ago
Obviously I''m quite the OpenGL novice... and there is a probably a simple solution to my problem, but I can''t seem to find it. So... I have an object which I use smooth shading on, and I have specified a color for each vertex, and this works great (colors blend just as the should), however when I setup and enable lighting the object appears in shades of grey. Anyone have any ideas? Do I need to setup material properties in order to maintain coloring?
yes you need to set up material properties to work with lighting. However, there is a very simple solution, simply use:
glEnable(GL_COLOR_MATERIAL);

This topic is closed to new replies.

Advertisement