Show
Ignore:
Timestamp:
06/17/10 16:18:11 (4 years ago)
Author:
robert
Message:

Added event handling

Files:
1 modified

Legend:

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

    r9692 r11622  
    2828 
    2929#include <osgGA/TrackballManipulator> 
     30#include <osgGA/StateSetManipulator> 
    3031#include <osgViewer/Viewer> 
     32#include <osgViewer/ViewerEventHandlers> 
    3133 
    3234#include <osg/Quat> 
     
    511513    viewer.setCameraManipulator(new osgGA::TrackballManipulator()); 
    512514 
     515    // add the stats handler 
     516    viewer.addEventHandler(new osgViewer::StatsHandler); 
     517 
     518    // add the state manipulator 
     519    viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) ); 
     520 
    513521 
    514522    // create the windows and run the threads.