Added passing of arugments into viewer constructor

This commit is contained in:
Robert Osfield 2007-06-13 15:32:17 +00:00
parent fbd1f3031d
commit 5213856929

View File

@ -198,7 +198,7 @@ int main(int argc, char **argv)
// construct the viewer. // construct the viewer.
osgViewer::Viewer viewer; osgViewer::Viewer viewer(arguments);
// add the state manipulator // add the state manipulator
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) ); viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
@ -290,9 +290,6 @@ int main(int argc, char **argv)
while (arguments.read("--ortho") || arguments.read("--orthographic")) technique = osgSim::OverlayNode::VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY; while (arguments.read("--ortho") || arguments.read("--orthographic")) technique = osgSim::OverlayNode::VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY;
while (arguments.read("--persp") || arguments.read("--perspective")) technique = osgSim::OverlayNode::VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY; while (arguments.read("--persp") || arguments.read("--perspective")) technique = osgSim::OverlayNode::VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY;
unsigned int screenNum = 0;
while (arguments.read("--screen", screenNum) || arguments.read("-s", screenNum)) viewer.setUpViewOnSingleScreen(screenNum);
std::string pathfile; std::string pathfile;
while (arguments.read("-p",pathfile)) {} while (arguments.read("-p",pathfile)) {}