From 8fae9c57796404f74ebd19fa2fbe65da5342517c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 17 Jun 2010 14:18:11 +0000 Subject: [PATCH] Added event handling --- examples/osgcluster/osgcluster.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/osgcluster/osgcluster.cpp b/examples/osgcluster/osgcluster.cpp index 523a8e856..8a42bea82 100644 --- a/examples/osgcluster/osgcluster.cpp +++ b/examples/osgcluster/osgcluster.cpp @@ -27,7 +27,9 @@ #include #include +#include #include +#include #include #include @@ -510,6 +512,12 @@ int main( int argc, char **argv ) viewer.setCameraManipulator(new osgGA::TrackballManipulator()); + // add the stats handler + viewer.addEventHandler(new osgViewer::StatsHandler); + + // add the state manipulator + viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) ); + // create the windows and run the threads. viewer.realize();