View Full Version : Point Lights
09-30-2002, 03:16 AM
I need to render my scene with a PointLight with Attenuation (LINEAR_ATTENUATION for exemple).
Can someone guide me to get the source code running to acomplish it??
Check out the documentation for the glLight() function call:
The params parameter is a single integer or floating-point value that specifies one of the three light attenuation factors. Integer and floating-point values are mapped directly. Only nonnegative values are accepted. If the light is positional, rather than directional, its intensity is attenuated by the reciprocal of the sum of: the constant factor, the linear factor multiplied by the distance between the light and the vertex being lighted, and the quadratic factor multiplied by the square of the same distance. The default attenuation factors are (1,0,0), resulting in no attenuation.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.