-
Vertex colors and lights.
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.
-
Re: Vertex colors and lights.
vertex colors do not work with lights
assuming you are using
glColor....
you should use instead
glMaterial.....
-
Re: Vertex colors and lights.
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules