I’m rendering a scene containing several lines. With lighting disabled everything renders fine using calls to glColor for the line coloring.
The problem comes when I enable lighting and call glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE). As I rotate the model (or the light) the lines intensity changes. Expected behavior but I want the lines to render with consistent intensity all around. Anyone know of a descent solution to keep GL_LINES intensity constant with lighting enabled?
Doh! Because I’m a idiot. I made the assumption that lights were either on or off and I wanted to mix surfaces with my lines. But that assumption was wrong. I just tested it and if I disable lighting when I render lines, and re-enable to render surfaces things work perfect. Appreciate your response, because it would have taken me a lot longer to figure that out without it.
Glad it solved it for you. And btw, if I had a penny for every time I’ve missed something obvious, well… I’d have a very big pile of pennies! That’s all I am saying!