Show
Ignore:
Timestamp:
09/29/07 13:41:57 (7 years ago)
Author:
robert
Message:

From Stephan Huber, add basic support for CompositeViewer? in StatsHandler?

Files:
1 modified

Legend:

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

    r6941 r7505  
    3535#include <osgGA/FlightManipulator> 
    3636#include <osgGA/StateSetManipulator> 
     37#include <osgViewer/ViewerEventHandlers> 
    3738 
    3839#include <osgViewer/CompositeViewer> 
     
    140141     
    141142     
     143 
     144     
    142145    if (arguments.read("-1")) 
    143146    { 
     
    145148            osgViewer::View* view = new osgViewer::View; 
    146149            view->setSceneData(osgDB::readNodeFile("fountain.osg")); 
    147  
     150             
     151            osg::ref_ptr<osgViewer::StatsHandler> statsHandler = new osgViewer::StatsHandler; 
     152            view->addEventHandler( statsHandler.get() ); 
     153             
     154             
    148155            view->setUpViewAcrossAllScreens(); 
    149156            view->setCameraManipulator(new osgGA::TrackballManipulator); 
     
    179186            view->setSceneData(scene.get()); 
    180187            view->setCameraManipulator(new osgGA::TrackballManipulator); 
     188             
     189            osg::ref_ptr<osgViewer::StatsHandler> statsHandler = new osgViewer::StatsHandler; 
     190            view->addEventHandler( statsHandler.get() ); 
     191 
    181192             
    182193            // add the handler for doing the picking 
     
    238249 
    239250            view->addEventHandler( statesetManipulator.get() ); 
     251             
     252            osg::ref_ptr<osgViewer::StatsHandler> statsHandler = new osgViewer::StatsHandler; 
     253            view->addEventHandler( statsHandler.get() ); 
    240254        } 
    241255