I have now moved the StatsHandler class from osgviewer into osgViewer
so its now reusable in other osgViewer::Viewer based applications.  I
have also added the frame markers and millisecond ticks to the on
screen output, and the ability to customize what keys control the
stats.  To add stats to your own apps.

To add stats to your own programs all your need to do is:

   // add stats
   viewer.addEventHandler( new osgViewer::StatsHandler() );

I have now added this exact line to the osgshadow example to help in
benchmarking my shadow work ;-)

Items left to do on the stats front are the addition of
primitive/vertex info and better placement of the GPU stats by adding
checks against queries on other places in the frame cycle.  The
current StatsHandler only works for osgViewer::Viewer right now, so
I'll need to do some work later on generalising it handle
osgViewer::CompositeVierwer as well.

Robert.
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to