PDA

View Full Version : Sun like attenuation



Succinct
11-05-2000, 10:11 AM
Just what gl-states and variables should i set to make light0 behave in a fashion similar to the sun? I guess i'm more worried about the CONSTANT_ATTENUATION/LINEAR_ATTENUATION/QUADRATIC_ATTENUATION parameters of glLight, and how setting them to non-zero values affect overall performance.

thx all.

BK
11-05-2000, 04:46 PM
Generally the sun it considered to the an infinate light source. In OpenGL terms this is a directional light which only has properties of direction, not position.

In this case the values you mention are not applicable.

I can't remember the details, but I think that if you choose GL_LIGHT_POSITION as the parameter for glLightfv,then the 4th float in the value array represents a flag that measn positional, or directional light source.