Added new osg::Stats class for collecting frame stats of different sorts.
Added s/getStats() to osg::View and osg::Camera. Added population of View::getStats() with frame stats in osgViewer/Viewer. Added Basic StatsHandler to osgviewer example.
This commit is contained in:
@@ -31,6 +31,17 @@ class OSG_EXPORT View : public virtual osg::Referenced
|
||||
|
||||
View();
|
||||
|
||||
|
||||
/** Set the Stats object used for collect various frame related timing and scene graph stats.*/
|
||||
void setStats(osg::Stats* stats) { _stats = stats; }
|
||||
|
||||
/** Get the Stats object.*/
|
||||
osg::Stats* getStats() { return _stats.get(); }
|
||||
|
||||
/** Get the const Stats object.*/
|
||||
const osg::Stats* getStats() const { return _stats.get(); }
|
||||
|
||||
|
||||
/** Set the master camera of the view. */
|
||||
void setCamera(osg::Camera* camera) { _camera = camera; }
|
||||
|
||||
@@ -84,6 +95,8 @@ class OSG_EXPORT View : public virtual osg::Referenced
|
||||
|
||||
virtual ~View();
|
||||
|
||||
osg::ref_ptr<osg::Stats> _stats;
|
||||
|
||||
osg::ref_ptr<osg::Camera> _camera;
|
||||
|
||||
typedef std::vector<Slave> Slaves;
|
||||
|
||||
Reference in New Issue
Block a user