Fog Mode

There are three different fog modes:

glFogi(GL_FOG_MODE, GL_LINEAR)
Fog ranges from none at near distance (GL_FOG_NEAR) to full at far distance (GL_FOG_FAR)

glFogi(GL_FOG_MODE, GL_EXP)
glFogi(GL_FOG_MODE, GL_EXP2)
Fog density is an exponential function of the distance. The density is varied by the GL_FOG_DENSITY parameter.