Demo 16 -- No fog?
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
-- Nathan Hoobler
Hi
i have the same problem, and i think that the voodoo 3 card is the reasen. Nehe said something that it doesen''t work on voodoo 3 cards, so its not the code which is wrong.
cu
Shadow
i have the same problem, and i think that the voodoo 3 card is the reasen. Nehe said something that it doesen''t work on voodoo 3 cards, so its not the code which is wrong.
cu
Shadow
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.
http://www.mesa3d.org
And just put the DLLs in your working directory.
Y.
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
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
you can get 3dfx drivers, if that''s what you have from 3dfx.com or Glsetup.com
JoeMont001@aol.com www.polarisoft.n3.net
JoeMont001@aol.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
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
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
-- Nathan Hoobler
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.
Y.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement