Archived

This topic is now archived and is closed to further replies.

Demo 16 -- No fog?

This topic is 6363 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In my attempts to learn OpenGL, I have been working out of both a reference book I have and the online NeHe tutorials (a terrific resourse, Kudos there). I have run into a rather perculiar quandry: The fog effects do not work! Here is a point-by-point breakdown... - My fog effects (enabled by the following code) are not apparant at all. //... Code ... GLfloat fogColor[4]= {1.0f, 1.0f, 1.0f, 0.0f}; glFogi(GL_FOG_MODE, GL_EXP); glFogfv(GL_FOG_COLOR, fogColor); glFogf(GL_FOG_DENSITY, 0.1f); glHint(GL_FOG_HINT, GL_NICEST); glFogf(GL_FOG_START, 1.0f); glFogf(GL_FOG_END, 10.0f); glEnable(GL_FOG); // ... More Code ... - The fog in the NeHe tutorial ALSO does not work! There is no fog in either the precompiled executable or in the recompiled source. - Finally, the fog demo in the book I am using (OpenGL SuperBible, Edition 2)DOES work! It is GLUT-Based, and for some odd reason has it''s fog enabling code running every time it redraws. I have tried mimicing this, but my code still does not work. Any suggestions from GL Gurus would be of great help. -- Nathan Hoobler

Share this post


Link to post
Share on other sites
Nathan, you probably have a 3dfx, don''t you ? 3dfx doesn''t support fog in their drivers, but Vaudoos can do fogging. You simply don''t have the correct drivers. You can download the mesa 3d library which is a free implementation of OpenGL and supports fogging in hardware. Actually it''s working like a glide wrapper. Try to download it at:

http://www.mesa3d.org

And just put the DLLs in your working directory.

Y.

Share this post


Link to post
Share on other sites
Try:-
glShadeModel(GL_FLAT);
and u might find u'r fog magically appears, don't know why though but sometimes on some cards for some reason for and smooth shading don't go together. Please Correct me if I'm wrong(Not unusual).

Edited by - Seaman on July 13, 2000 9:43:00 AM

Share this post


Link to post
Share on other sites
Yep, that''s most likely it. I have a Voodoo 3 AGP.
Kind of bizzare that such a full-featured card doesn''t support FOG effects... =/

Oh well, I will play around with the drivers, then (as if I don''t reboot enough already while programming...).
Thanks for the responses; hopefully I will be on the right track again soon.

-- Nathan Hoobler

Share this post


Link to post
Share on other sites
A bunch of answers: fogging isn''t supported by actual 3dfx drivers. Julio, downloading new official drivers won''t fix it, i already tried. The original 3dfx drivers for Vaudoo 2s do not support fog. I guess it''s the same for Vaudoo 3s. Nathan, it''s not the card that doesn''t support fogging. It''s only a problem of drivers. You card does fogging very well.. try the mesa3d drivers and you''ll see. And Seaman.. i doubt it will fix anything, and if it does, you sure don''t want to use flat shading everywhere

Y.

Share this post


Link to post
Share on other sites