paddy
10-17-2000, 02:21 AM
I use this code to enable fog :
glFloat col[4];
col[0]=...
col[1]=...
col[2]=...
col[3]=...
glFogf(GL_FOG_MODE,GL_EXP);
glFogf(GL_FOG_DENSITY,0.02);
glFogf(GL_FOG_START,1.0);
glFogf(GL_FOG_END,5.0);
glHint(GL_FOG_HINT,GL_NICEST);
glFogfv(GL_FOG_COLOR,col);
glEnable(GL_FOG);
The fog generated don't rotate with my scene.
When i rotate the camera, the fog is thick on the z axis, but becomes thinner when i rotate the camera away from the z axis.
(mmmhhh... i hope the explanation is clear)
Do anyone have a solution ?
glFloat col[4];
col[0]=...
col[1]=...
col[2]=...
col[3]=...
glFogf(GL_FOG_MODE,GL_EXP);
glFogf(GL_FOG_DENSITY,0.02);
glFogf(GL_FOG_START,1.0);
glFogf(GL_FOG_END,5.0);
glHint(GL_FOG_HINT,GL_NICEST);
glFogfv(GL_FOG_COLOR,col);
glEnable(GL_FOG);
The fog generated don't rotate with my scene.
When i rotate the camera, the fog is thick on the z axis, but becomes thinner when i rotate the camera away from the z axis.
(mmmhhh... i hope the explanation is clear)
Do anyone have a solution ?