Show
Ignore:
Timestamp:
01/11/07 16:19:59 (7 years ago)
Author:
robert
Message:

Ported following examples to osgViewer:

osgteapot
osgtessellate
osgtext
osgtexture1D
osgtexture2D
osgtexture3D
osgtexturerectangle
osgvertexprogram
osgvolume
osgwindows
osgsimple
osgkeyboardmouse

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgvolume/osgvolume.cpp

    r5763 r5962  
    2626#include <osgUtil/CullVisitor> 
    2727 
    28 #include <osgProducer/Viewer> 
     28#include <osgViewer/Viewer> 
     29 
     30#include <iostream> 
    2931 
    3032 
     
    14381440 
    14391441    // 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; 
    14471443 
    14481444    // if user request help write it out to cout. 
     
    16391635        viewer.setSceneData(rootNode); 
    16401636         
    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(); 
    16661639    }     
    16671640