PDA

View Full Version : Light in Finite Distance



1stChineseAstronaut
10-02-2003, 08:21 AM
Hi All. Is there somebody who knows to solve the following problem (if is it solvable at all):

For purpose of the scene lighting in OpenGL are generally supposed the distance from the light to the illuminated vertex is INFINITE, i.e. the scene is illuminated by parallel bunch of beams. Does some way exist how to place the light in FINITE distance from the scene? I need light the scene up by divergent bunch of beams.

Thanks in advance.

V-man
10-02-2003, 08:44 AM
Positional light, why not?

pos={0, 0, 0, 1}; //4th component makes it a positional light
glLight(GL_LIGHTx, GL_POSITION, pos);


read the red book.

1stChineseAstronaut
10-02-2003, 01:10 PM
Tank You V-man, it operates well. I've already tried it, but with wrong coords of light -) therefore I was confused. Bye.