Fog?

It doesn’t matter what value i put in the glFogf(GL_FOG_START, 1.0f);
glFogf(GL_FOG_END, 5.0f);
It always look the same!
Any ideas?

This will only work with linear fog, so check that you are using this type of fog (and not GL_EXP or GL_EXP2 !).

Moreover, it can be a density problem…

Can you describe more precisely what you see on the screen ? (And what you’d like to see ! )

Eric

Im using GL_EXP2 now.
I want to be able to move the fog forward and backwards, thats what
glFogf(GL_FOG_START, 1.0f); is made for ? or have i got this completely wrong?
I dont have my compiler here right now so i cant try GL_LINEAR right now, i hope that’s the problem

oh i forgott, when i use GL_EXP2 i see fog but i cant change it forwards and backwards only the density.

The GL_START and GL_END tokens will only work with linear fog. You can not set fog start and end for exp or exp2 fogs !

You should have a look at volumetric fog topics if you are looking for more realistic fog than basic OpenGL one…

Eric

Remember that exp(0)=1, and linear(0)=0, so the fog is really different if you are in exp (or exp2) or if you’re in linear !