Jump to content
  • Advertisement
Sign in to follow this  
reenam

OpenGL lighting techniques in openGl

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

We want to implement light on our game...our game is like warcraft...how could we get started....how could we effective include light in our game...please help us to get started.

Share this post


Link to post
Share on other sites
Advertisement
The easiest way is to take advantage of the builtin fixed function pipeline, that is with methods such as glEnable(GL_LIGHTING), glLightfv() and the rest. As the maximum amount of lights is usually 8 at once, one good way for moving objects is to calculate the nearest lights and for static world to divide it into cells. If you go into vertex lighting you might get better results.

Other techniques are lightmapping and per-pixel lighting, with the last mostly done with fragment shaders.

It all boils down to whether or not you want to start implementing shaders or use the fixed function, which I think in GL3.xxx is considered deprecated.

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!