05-04-2000, 09:01 AM
How can I create a fog? Just something easy, nothing fancy. Code is appreciated...
05-04-2000, 09:42 AM
here it is a piece of code to enable fog
this one should clear the screen on the color of the fog you have defined
glFogi(GL_FOG_MODE, GL_LINEAR); //
Instead of GL_LINEAR you can also try GL_EXP and GL_EXP2
the fogcolor variable should be on the same color as the one from glClearColor
This one defines the density of the fog
This one i really don't know http://www.opengl.org/discussion_boards/ubb/smile.gif
Fog_start and Fog_end, is from where the fog begin and where it ends.
I believe using fog, makes the render more realistic and much faster, because objects that are behind the fog are not computed
hope this helps
05-06-2000, 06:03 AM
Thanx! Just the kind of answer I wanted.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.