|
osg中设置node的StateSet后,能自动恢复么,比如:
osg::Node *pNode = osgDB::readNodeFile(strFileName);
if(pNode != 0)
{
osg::StateSet *pStateSet = pNode->getOrCreateStateSet();
pStateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF |osg::StateAttribute::OVERRIDE);
pStateSet->setAttributeAndModes(new osg:olygonOffset( 1.0, 1.0 ),osg::StateAttribute::ON|osg::StateAttribute::OVERRIDE);
}
我不知道osg是否在渲染完这个节点后后自动恢复GL_LIGHTING为osg::StateAttribute:n |
|