Skip to content

Commit

Permalink
Added command line parser to osgparticle examples viewer setup to mak…
Browse files Browse the repository at this point in the history
…e it easier to position window
  • Loading branch information
robertosfield committed Aug 25, 2016
1 parent a63b900 commit efd8fd4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions examples/osgparticle/osgparticle.cpp
Expand Up @@ -471,17 +471,23 @@ void build_world(osg::Group *root)
//////////////////////////////////////////////////////////////////////////////


int main(int, char **)
int main(int argc, char** argv)
{
// use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc,argv);

// construct the viewer.
osgViewer::Viewer viewer;
osgViewer::Viewer viewer(arguments);

osg::Group *root = new osg::Group;
build_world(root);

// add the stats handler
viewer.addEventHandler(new osgViewer::StatsHandler);

// add the window size toggle handler
viewer.addEventHandler(new osgViewer::WindowSizeHandler);

// add a viewport to the viewer and attach the scene graph.
viewer.setSceneData(root);

Expand Down

0 comments on commit efd8fd4

Please sign in to comment.