OpenGl Lighting
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
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
Visit our homepage: www.rarebyte.de.st
GA
Visit our homepage: www.rarebyte.de.stGA
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement