Changeset 5903 for OpenSceneGraph/trunk/examples/osganimate/osganimate.cpp
- Timestamp:
- 01/05/07 15:48:50 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osganimate/osganimate.cpp
r5381 r5903 16 16 #include <osgSim/OverlayNode> 17 17 18 #include <osg Producer/Viewer>19 18 #include <osgViewer/Viewer> 19 #include <iostream> 20 20 21 21 osg::AnimationPath* createAnimationPath(const osg::Vec3& center,float radius,double looptime) … … 216 216 217 217 // initialize the viewer. 218 osgProducer::Viewer viewer(arguments); 219 220 // set up the value with sensible default event handlers. 221 viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); 222 223 // get details on keyboard and mouse bindings used by the viewer. 224 viewer.getUsage(*arguments.getApplicationUsage()); 218 osgViewer::Viewer viewer; 225 219 226 220 // if user request help write it out to cout. … … 263 257 viewer.setSceneData(rootnode); 264 258 265 // create the windows and run the threads. 266 viewer.realize(); 267 268 while( !viewer.done() ) 269 { 270 // wait for all cull and draw threads to complete. 271 viewer.sync(); 272 273 // update the scene by traversing it with the the update visitor which will 274 // call all node update callbacks and animations. 275 viewer.update(); 276 277 // fire off the cull and draw traversals of the scene. 278 viewer.frame(); 279 280 } 281 282 // wait for all cull and draw threads to complete. 283 viewer.sync(); 284 285 // run a clean up frame to delete all OpenGL objects. 286 viewer.cleanup_frame(); 287 288 // wait for all the clean up frame to complete. 289 viewer.sync(); 290 291 return 0; 292 } 259 return viewer.run(); 260 }
