Click to See Complete Forum and Search --> : Problem with opengl fog


thre3dee
August 28th, 2005, 10:28 PM
Ive setup a small landscape scene in my opengl app but its fogging the scene as if im looking from above not away from my actual view.

heres a screenshot
http://img217.imageshack.us/img217/1427/fog1gu.th.jpg (http://img217.imageshack.us/my.php?image=fog1gu.jpg)


glFogfv (GL_FOG_COLOR, fogrgba /* Same as background colour */);
glFogf (GL_FOG_DENSITY, 0.5f);
glFogi (GL_FOG_MODE, GL_LINEAR);
glFogf (GL_FOG_START, 1);
glFogf (GL_FOG_END, 30);
glHint (GL_FOG_HINT, GL_NICEST);
glEnable (GL_FOG);