Jump to content

  • Log In with Google      Sign In   
  • Create Account


OpenGl Lighting


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Louden   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 April 2000 - 07:55 AM

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

Sponsor:

#2 ga   Members   -  Reputation: 126

Like
Likes
Like

Posted 16 April 2000 - 08:14 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS