[osg-users] Fog problem

Robert Osfield robert.osfield at gmail.com
Thu Jul 10 03:59:46 PDT 2008


Hi Eric,

What happens when you run:

  osgprecipitation lz.osg

Robert.

On Thu, Jul 10, 2008 at 11:22 AM, Eric ZAREMBA
<eric.zaremba at ersa-france.com> wrote:
> Hi,
>
>
>
>
>
> Since yesterday, I have a problem with fog.
>
> When I turn it one, my scene becomes black, even if I deactivate the
> lighting.
>
> It is very strange, because I don't update my OSG version (which is 2.5.2)
> nor recompile it.
>
>
>
> I make a small program to test this out of my other stuff, and test it on
> two different machines (both under WinXP, one with an ATI FireGL, the other
> with a NVidia QuadroFx).
>
>
>
> // my minimal test program
>
> int main ( int argc, char const *argv[] )
>
> {
>
>       osgViewer::Viewer myViewer;
>
>       myViewer.addEventHandler(new osgViewer::StatsHandler);
>
>       myViewer.addEventHandler(new
> osgGA::StateSetManipulator(myViewer.getCamera()->getOrCreateStateSet()));
>
>       myViewer.addEventHandler(new osgViewer::HelpHandler);
>
>
>
>       osg::ref_ptr<osg::Group> pRoot = new osg::Group;
>
>       osg::StateSet* stateset = pRoot->getOrCreateStateSet();
>
>       stateset->setMode( GL_FOG, osg::StateAttribute::ON );
>
> //    stateset->setMode( GL_LIGHTING, osg::StateAttribute::OFF );
>
>
>
>       osgParticle::PrecipitationEffect* pe = new
> osgParticle::PrecipitationEffect;
>
>       pRoot->addChild( pe );
>
>       pe->rain(0.3);
>
>
>
>       osg::Node* pNode = osgDB::readNodeFile("lz.osg");
>
>       pRoot->addChild( pNode );
>
>
>
>       myViewer.setSceneData(pRoot.get());
>
>       myViewer.realize();
>
>       myViewer.run();
>
>     return( 0 );
>
> }
>
>
>
> Computers drive me crazy! good will be the retirment, I will breed rabits.
>
> Eric Z.
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>



More information about the osg-users mailing list