Added StateSetManipulator usage

This commit is contained in:
Robert Osfield 2010-10-22 16:44:52 +00:00
parent 123c0a36c4
commit a2d99fc805

View File

@ -23,6 +23,7 @@
#include <osgDB/ReadFile> #include <osgDB/ReadFile>
#include <osgGA/TrackballManipulator> #include <osgGA/TrackballManipulator>
#include <osgGA/StateSetManipulator>
#include <osgUtil/IncrementalCompileOperation> #include <osgUtil/IncrementalCompileOperation>
#include <osgUtil/Simplifier> #include <osgUtil/Simplifier>
@ -238,7 +239,8 @@ int main(int argc, char** argv)
viewer.setCameraManipulator( new osgGA::TrackballManipulator() ); viewer.setCameraManipulator( new osgGA::TrackballManipulator() );
viewer.addEventHandler( new osgViewer::StatsHandler()); viewer.addEventHandler( new osgViewer::StatsHandler());
viewer.addEventHandler(new osgViewer::WindowSizeHandler); viewer.addEventHandler( new osgViewer::WindowSizeHandler() );
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
// //