Hi Alex, There are three parts to stats - the stats storage, gathering and the stats display.
The osg::Stats class is a thread safe container for storing collected stats data, and various OSG classes can have Stats objects attached to them, such as osg::Camera and osg::View. The various traversals then fill the above Stats obects with data, in particular it's the Viewer/CompositeViewer/Renderer that do most of the stats collection. Then we have the StatsHandler that switches on the stats collect so the above start collecting and storing stats, and then displays the results. To add custom stats you'll just need to add your own stats collection, and you may be able to simply reuse one of the exiting osg::Stats object as a place to dump this data, then subclass from osgViewer::StatsHandler or simply derive your own for the display of your stats. Robert. On Wed, Mar 11, 2009 at 7:01 PM, Alex French <[email protected]> wrote: > What would it take to add another attribute to the statshandler graph? In my > scene graph I do physics calculations between frames, and it would be nice if > I could say, start a timer before I run my physics loop, end the timer when > it's finished, and have that time added to the statistics overlay. > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=8285#8285 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

