Added stats handler to track performance effects of new GLBeginEndAdapter usage

This commit is contained in:
Robert Osfield 2009-10-21 15:48:11 +00:00
parent 4372ec3cba
commit 126462bb0b

View File

@ -17,6 +17,7 @@
*/ */
#include <osgViewer/Viewer> #include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
#include <osg/Group> #include <osg/Group>
#include <osg/Geode> #include <osg/Geode>
@ -368,6 +369,9 @@ int main(int, char **)
osg::Group *root = new osg::Group; osg::Group *root = new osg::Group;
build_world(root); build_world(root);
// add the stats handler
viewer.addEventHandler(new osgViewer::StatsHandler);
// add a viewport to the viewer and attach the scene graph. // add a viewport to the viewer and attach the scene graph.
viewer.setSceneData(root); viewer.setSceneData(root);