Archived

This topic is now archived and is closed to further replies.

Turned on lighting ... now no colour?

This topic is 5153 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Basically, once I enable lighting an a single ambient light, the function glColor4f (and so on) has no effect when I draw polys. That isn''t to say there is no colour at all ... if I make the ambient light green, there''s certainly green in the picture. But if I have ambient to { 1.0f, 1.0f, 1.0f, 1.0f } and glColor4f(0.0f, 1.0f, 0.0f, 1.0f) ... all I get is shaded white/gray. What''s up with that? - Ben

Share this post


Link to post
Share on other sites
Look into setting proper surface materials, or to use glColour* again use glEnable(GL_COLOUR_MATERIAL) and its associated functions (probably just bind ambient and diffuse to the vertex colour and set specular as white).

Share this post


Link to post
Share on other sites