PDA

View Full Version : Vertex colors and lights.



dxantos
10-02-2000, 07:49 PM
Here is the problem I have.

The scene renders with vertex colors perfectly. But after activating openGL lighting It takes the light, but the colors disappear. The result is an ugly grayscale image. Is there anything I need to know about lights in opengl?

BTW. I really need the Vertex colors to conserve texture memory.

10-02-2000, 09:00 PM
vertex colors do not work with lights
assuming you are using

glColor....

you should use instead

glMaterial.....

10-03-2000, 04:21 AM
A quicker easier way to do it is to use glColorMaterial(GL_FRONT_AND_BACK,GL_AMBIENT_AND_D IFFUSE);
glEnable(GL_COLOR_MATERIAL);
i think I got all the options correct. Note that you need to call glColorMaterial b4 the glEnable. You can change to options to glColorMaterial to get other effects.