thanks, but it still doesn't work  : / 

"myst" was renamed by "stateset"

void Environment::set_fog(osg::Group* root)
{
        fog->setMode(osg::Fog::LINEAR);
        fog->setDensity(0.1f); 
        fog->setColor(osg::Vec4f(0.8f,0.8f,0.8f,1.0f)); 
        fog->setStart(-20.0f);
        fog->setEnd(90.0f);     
        stateset->setAttribute(fog, osg::StateAttribute::ON); 
        stateset->setMode(GL_FOG, osg::StateAttribute::ON | 
osg::StateAttribute::OVERRIDE);
        //show backface (test)
        osg::CullFace* cf = new osg::CullFace(osg::CullFace::FRONT); 
        stateset->setAttributeAndModes(cf, osg::StateAttribute::ON);
        root->setStateSet(stateset);
}

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=10293#10293





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to