I just have got so that I use lighting and move around the scene, but while I move/look around, lighting goes wrong. When I look directly to a face, it goes completely black.
My normals are quite ok I think and I use gluLookAt(). So, what could cause this kind of behaviour?
Try to calculate your normals with your own functions (if you don’t already).
If it still doesn’t work, I don’t know what’s the problem.
What type of lights are you using?
If you dont update the position of your light source, your light will be moving with you… It sounds to me that your normals are backwards and that you dont update your light source position every frame…
Something else is that GL_NORMALIZE will not have any kind of visual effect unless you scale you objects, which in turn your normals should be also rescaled… So to avoid rescaling your normals you enable GL_NORMALIZE. I doubt this is the problem.
Try negating your y values of your normal values and update your light source with
glLightfv( GL_LIGHT0, GL_POSITION, m_Light.light_Position );
Wingman, OGL does not compute normal vectors for you, so I take for granted that he has a funtion to compute his normals…
OGL standards require that all states be disabled by default… So GL_NORMALIZE should are disabled by default.
[This message has been edited by mancha (edited 08-18-2002).]