From a2d99fc8051b4a3b10bce4eed6dbf2b1d962ded8 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 22 Oct 2010 16:44:52 +0000 Subject: [PATCH] Added StateSetManipulator usage --- examples/osganalysis/osganalysis.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/osganalysis/osganalysis.cpp b/examples/osganalysis/osganalysis.cpp index 6e1bb3abc..da6cc70b9 100644 --- a/examples/osganalysis/osganalysis.cpp +++ b/examples/osganalysis/osganalysis.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -236,9 +237,10 @@ int main(int argc, char** argv) // construct the viewer. osgViewer::Viewer viewer(arguments); - viewer.setCameraManipulator(new osgGA::TrackballManipulator()); - viewer.addEventHandler(new osgViewer::StatsHandler()); - viewer.addEventHandler(new osgViewer::WindowSizeHandler); + viewer.setCameraManipulator( new osgGA::TrackballManipulator() ); + viewer.addEventHandler( new osgViewer::StatsHandler()); + viewer.addEventHandler( new osgViewer::WindowSizeHandler() ); + viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) ); ///////////////////////////////////////////////////////////////////////////////// //