Jump to content
  • Advertisement

Archived

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

carb

Turned on lighting ... now no colour?

This topic is 5370 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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!