Hi, Strange...
My small fog test program works fine on my laptop at home ?!?! All test cases behave as expected. Same OSG version (2.2), different hardware and linux distribution. I still get (at home) the same warning though: --- "detected OpenGL error 'invalid enumerant' after RenderBin::draw(,)" I'll try a clean recompile of everything. Hans > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Elbers, H.P. > Sent: dinsdag 13 november 2007 17:31 > To: OpenSceneGraph Users > Subject: Re: [osg-users] Problem with osg::Fog > > Hi, > > Thank you all for comments so far! > > I did'n specify a source for fog coordinates. > Adding the following made no difference: > fog->setFogCoordinateSource(osg::Fog::FRAGMENT_DEPTH); > > I also added the following to be sure, no luck... > state->setMode(GL_DEPTH_TEST,osg::StateAttribute::ON); > state->setMode(GL_FOG, osg::StateAttribute::ON); > > The starnge thing is tha (linear) fog works fine when I do > fog->setStart(-200.f); fog->setEnd(-300.f); > > But NOT when I do: > fog->setStart(200.f); fog->setEnd(300.f); > > Recap: current settings: > > StateSet *state= world->getOrCreateStateSet(); > state->setMode(GL_DEPTH_TEST,osg::StateAttribute::ON); > state->setMode(GL_FOG, osg::StateAttribute::ON); > > fog->setColor(Vec4(1.,0.,0., 1.)); // Red fog for testing > fog->setDensity(0.); > fog->setMode(Fog::LINEAR); > fog->setStart(200.f); fog->setEnd(300.f); // Does not work > fog->setStart(-200.f); fog->setEnd(-300.f); // Works > fog->setFogCoordinateSource(osg::Fog::FRAGMENT_DEPTH); > state->setAttributeAndModes(fog,StateAttribute::ON); > > Another thing: I found that all my osg-apps, including > osgviewer, give a warning after starting: > "detected OpenGL error 'invalid enumerant' after RenderBin::draw(,)" > Comes from RenderStage::drawInner() in > src/osgUtil/RenderStage.cpp:728... > > I will check on another computer (at home) if same it has the > same warning / problem > > I'm running out of ideas... Any clues are apreciated, > Hans > > [snip] _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

