Jump to content
  • Advertisement

Archived

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

Louden

OpenGl Lighting

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

Hey heres a very easy question to answer: With OpenGL Lighting I noticed that with positions, they have 4 values aka: GLfloat LightPosition[]= {0.0f, 0.0f, 2.0f, 1.0f}; What the hell is that last value about? The first three are obviously X, Y, Z coordinates. I heard that the last value is to define what type of light it is (Omni, Direct, etc). Is this true? If so what do the differing values stand for? Finally one last question: What routines/commands are used for using lights to projecting images? Thanks, Louden

Share this post


Link to post
Share on other sites
Advertisement
If you specify the light position, the 4th value is nothing more than the OpenGL w coordinate, a scaling coordinate. x, y and z are divided by w. Usually you set w to 1.0 if you don''t want scaling.

Visit our homepage: www.rarebyte.de.st

GA

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!