Jump to content
  • Advertisement
Sign in to follow this  
badkeeper3410

Some Problem with glLight and glColor

This topic is 4809 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

hello all. I have a question with the glLight function.In my terrain engine,i get the vertex color from a map, and i caculate the normals. now i what use the gllight function to make it looks more real. But I found that ,the glLight function replace the vertex color with the light color,and that's not my expect. is there any way to just blend the light color on the primary color or I need a second pass to achieve this? [Edited by - badkeeper3410 on June 18, 2005 11:27:38 PM]

Share this post


Link to post
Share on other sites
Advertisement
try
glEnable(GL_COLOR_MATERIAL); now you can use glColor*() with GL_LIGHTING

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!