View Full Version : Simple Q: vertex colors + lighting?

02-04-2007, 11:02 AM
I have a simple question. I am rendering a scene in fixed function mode from vertex buffers, with one light enabled, untextured. Now for debugging purposes I wantesd it to also show color so I extended it to include a color in the vertex format and I also bind the colors.
This works when I disable the lighting (everything is colored), but when I enable lighting I see everything lit again as if it were white (I set all vertex colors to red).
Is it possible to enable vertex colors and still have light influence it? I'd think so but I can't get it to work :eek: \

Any help would definitely be appreciated.


02-04-2007, 01:40 PM
Yes add the line glEnable(GL_COLOR_MATERIAL);

02-05-2007, 10:50 AM
Thank you very much :eek: ) I knew it had to be something simple....but what!?!