HI Timo,

It could be that some part of the scene turns of fog, if this is case
then the model could be cleaned up to not contain this use use mode
overriding when decorating the scene i.e.

 fogState->setModel(GL_FOG, osg::StateAttribute::OVERRIDE |
osg::StateAttribute::ON);

As for the gl hints, alas the OSG doesn't support hints yet, it
should, but it'll be a while before I have a timeslot where I can code
such additions.  For time being for you own app you could do the
OpenGL calls for the hints yourself.

Robert.

On 10/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:




Hi All,

I've some problems with my fog implementation.

First everything seemed working fine, but when we are driving around our
simulation, there are some bad effects.

It is possible that one street polygon looks nearly normal and the next one
is shown white. So at the border of these polygons there is a bad effect.

Does anyone know what I'm doing wrong?

I'm using the following code:



      fog = new osg::Fog();

      fog->setMode( osg::Fog::Mode::LINEAR );

fog->setStart (-100.0f);

      fog->setEnd (200.0f);



      osg::StateSet* fogState = new osg::StateSet();

      fogState->setAttributeAndModes(fog,
osg::StateAttribute::ON);

      fogState->setMode(GL_FOG, osg::StateAttribute::ON);

      root->setStateSet( fogState );





I've read something about there are different possibilities the quality of
the fog could be calculated:

GL_FOG_HINT: GL_NICEST, GL_FASTEST, GL_DONT_CARE



Can I set these parameters in my stateset?

Perhaps like this?

fogState->setMode(GL_FOG_HINT,GL_NICEST);



Or like this:

fogState->setMode(GL_DEPTH_TEST,osg::StateAttribute::OFF);





Thanks for your help!

Best Regards

Timo


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to