I am using
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, !inf());
if(inf())
{
glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 1);
glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0);
glLightf(GL_LIGHT0, GL_QUADRATIC_ATTENUATION, 0);
}
else
{
glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 0);
glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0);
glLightf(GL_LIGHT0, GL_QUADRATIC_ATTENUATION, 1);
}
to set my light’s attenuation. The function inf() returns whether or not the light is an infinite light. The funny thing is, the lights don’t attenuate at all (they’re constant attenuation). Is there something I might be missing here?