Jump to content
  • Advertisement

Archived

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

Lucien

About Lights

This topic is 6390 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 some questions about lights in OpenGL How many can we use at the same time ? Is it a good way to set them at the same time, instead of doing : glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient) glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse) glLightfv(GL_LIGHT1, GL_POSITION,LightPosition) glEnable(GL_LIGHT1) glLightfv(GL_LIGHT2, GL_AMBIENT, LightAmbient2) glLightfv(GL_LIGHT2, GL_DIFFUSE, LightDiffuse2) glLightfv(GL_LIGHT2, GL_POSITION,LightPosition2) glEnable(GL_LIGHT2); ..... ......... I store all the values of the light in a table, so I would like to use it. Thanks a lot Lucien

Share this post


Link to post
Share on other sites
Advertisement
you can have up to 8 lights (GL_LIGHT0 - GL_LIGHT7) but the performance can drop a LOT if you have a fairly complex scene.

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!