Fade lights in a distance

Hi all gurus in here
I want to have a light that fades with distance (illuminates closer objects, lets farther objects dark, e. g. moving a torch around). Of course I could first render the bright objects, disable the light, render the ones that are a bit darker, but there should be a better solution, or am I wrong?

Use OpenGL’s attenuation feature.

glLightf(GL_LIGHTn, GL_CONSTANT_ATTENUATION, kc);
glLightf(GL_LIGHTn, GL_LINEAR_ATTENUATION, kl);
glLightf(GL_LIGHTn, GL_QUADRATIC_ATTENUATION, kq);

Damping factor f = 1.0 / (kc + rkl + rr*kq).

r is the distance from the light to the vertex being lit.
kc/kl/kq is constant/linear/quadratic attenuation factors, controlling how much the light is dampend when you get further away.

Thanx alot
It works great (a bit slow, though).