i’m using the following code to install eight lights (left, right, top …):
for ( int i = 0; i < 8; i++){
glLightfv(GL_LIGHT0 + i, GL_AMBIENT, LightAmbient);
glLightf(GL_LIGHT0 + i, GL_SPOT_CUTOFF, 7.f);
glLightfv(GL_LIGHT0 + i, GL_POSITION, LightPosition[i]);
}
problem is that only light 0 functions correct. the other lights seem to shine with low intensity so that the scene is hardly lighten. the normals for the polygon are allright (from nehe) and even if i give every light the same position nothing changes. what might be the problem.
can anyone help me?
By default, all lights are black except GL_LIGHT0 which is white. I think your other lights are still black, cause you don’t set any diffuse or specular color (assuming that piece of code is all you do to the lights), so they default to RGBA=(0,0,0,1).