Added command line option for writing out the scene graph to file.
This commit is contained in:
parent
b40acacf53
commit
9bde24d3d2
@ -698,9 +698,12 @@ int main(int argc, char** argv)
|
|||||||
viewer.setSceneData(group);
|
viewer.setSceneData(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
std::string filename;
|
||||||
osgDB::writeNodeFile(*viewer.getSceneData(),"text.osg");
|
if (arguments.read("-o",filename))
|
||||||
#endif
|
{
|
||||||
|
osgDB::writeNodeFile(*viewer.getSceneData(),filename);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
||||||
viewer.addEventHandler(new osgViewer::StatsHandler());
|
viewer.addEventHandler(new osgViewer::StatsHandler());
|
||||||
@ -716,5 +719,7 @@ int main(int argc, char** argv)
|
|||||||
(*itr)->cancel();
|
(*itr)->cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user