Two Problems with Lighting

I have programmed a textured mountain and I have the following problems :

  1. The triangles get darker and darker as I walk towards them.
  2. When I try to set the light “at infinity” by setting its w-coordinate to 0, I get a blank screen.
    Please help !
  1. Have you set the normals (just checking)
  2. Why do you need the lightsource at infinity? Try setting it to a normal coordinate.

If you set w=0 then light (x,y,z) means light direction but not position. (0,0,0) will mean no direction.
Default lighting is not bad(its a directional light that points into the screen), so try it.
If screen is blank, you turned ambient light off. What for?

If the lighting is changing at all, then you aren’t setting up the light position/direction in the right place. You should do this after you set gluLookAt (or whatever you use for your camera matrix), since light position/direction is transformed through the modelview matrix.

I thank very much for your answers !