Changeset 5962 for OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp
- Timestamp:
- 01/11/07 16:19:59 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp
r5763 r5962 26 26 #include <osgUtil/CullVisitor> 27 27 28 #include <osgProducer/Viewer> 28 #include <osgViewer/Viewer> 29 30 #include <iostream> 29 31 30 32 … … 1438 1440 1439 1441 // construct the viewer. 1440 osgProducer::Viewer viewer(arguments); 1441 1442 // set up the value with sensible default event handlers. 1443 viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); 1444 1445 // get details on keyboard and mouse bindings used by the viewer. 1446 viewer.getUsage(*arguments.getApplicationUsage()); 1442 osgViewer::Viewer viewer; 1447 1443 1448 1444 // if user request help write it out to cout. … … 1639 1635 viewer.setSceneData(rootNode); 1640 1636 1641 // create the windows and run the threads. 1642 viewer.realize(); 1643 1644 while( !viewer.done() ) 1645 { 1646 // wait for all cull and draw threads to complete. 1647 viewer.sync(); 1648 1649 // update the scene by traversing it with the the update visitor which will 1650 // call all node update callbacks and animations. 1651 viewer.update(); 1652 1653 // fire off the cull and draw traversals of the scene. 1654 viewer.frame(); 1655 1656 } 1657 1658 // wait for all cull and draw threads to complete. 1659 viewer.sync(); 1660 1661 // run a clean up frame to delete all OpenGL objects. 1662 viewer.cleanup_frame(); 1663 1664 // wait for all the clean up frame to complete. 1665 viewer.sync(); 1637 // the the viewers main frame loop 1638 viewer.run(); 1666 1639 } 1667 1640
