8 #ifndef CO_coVRStatsDisplay_h
9 #define CO_coVRStatsDisplay_h
11 #include <util/coTypes.h>
12 #include <osg/AnimationPath>
13 #include <osgText/Text>
14 #include <osgGA/GUIEventHandler>
15 #include <osgGA/AnimationPathManipulator>
17 #include <osgViewer/GraphicsWindow>
18 #include <osgViewer/Viewer>
35 CAMERA_SCENE_STATS = 3,
36 VIEWER_SCENE_STATS = 4,
42 return _blockMultiplier;
56 void showStats(
int whichStats, osgViewer::ViewerBase *viewer);
58 void enableGpuStats(
bool enable,
const std::string &devname = std::string());
59 void enableRhrStats(
bool enable);
60 void enableFinishStats(
bool enable);
61 void enableSyncStats(
bool enable);
64 virtual void getUsage(osg::ApplicationUsage &usage)
const;
67 void setUpHUDCamera(osgViewer::ViewerBase *viewer);
69 osg::Geometry *createBackgroundRectangle(
const osg::Vec3 &pos,
const float width,
const float height, osg::Vec4 &color);
71 osg::Geometry *createGeometry(
const osg::Vec3 &pos,
float height,
const osg::Vec4 &colour,
unsigned int numBlocks);
73 osg::Geometry *createFrameMarkers(
const osg::Vec3 &pos,
float height,
const osg::Vec4 &colour,
unsigned int numBlocks);
75 osg::Geometry *createTick(
const osg::Vec3 &pos,
float height,
const osg::Vec4 &colour,
unsigned int numTicks);
77 osg::Node *createCameraTimeStats(
const std::string &font, osg::Vec3 &pos,
float startBlocks,
bool acquireGPUStats,
float characterSize, osg::Stats *viewerStats, osg::Camera *camera);
79 void setUpScene(osgViewer::ViewerBase *viewer);
81 void updateThreadingModelText(osgViewer::ViewerBase::ThreadingModel tm);
93 bool _finishStats =
true;
94 bool _syncStats =
true;
95 bool _gpuStats =
false;
97 bool _rhrStats =
false;
unsigned int _viewerSceneChildNum
Definition: coVRStatsDisplay.h:111
unsigned int _gpuClockChildNum
Definition: coVRStatsDisplay.h:101
Definition: VRViewer.h:52
osg::Camera * getCamera()
Definition: coVRStatsDisplay.h:47
osgViewer::ViewerBase::ThreadingModel _threadingModel
Definition: coVRStatsDisplay.h:90
unsigned int _gpuChildNum
Definition: coVRStatsDisplay.h:109
osg::ref_ptr< osgText::Text > _threadingModelText
Definition: coVRStatsDisplay.h:91
unsigned int _rhrDelayChildNum
Definition: coVRStatsDisplay.h:106
unsigned int _cameraSceneChildNum
Definition: coVRStatsDisplay.h:110
unsigned int _rhrBandwidthChildNum
Definition: coVRStatsDisplay.h:105
unsigned int _gpuPCIeChildNum
Definition: coVRStatsDisplay.h:100
int _statsType
Definition: coVRStatsDisplay.h:83
unsigned int _viewerChildNum
Definition: coVRStatsDisplay.h:108
osg::ref_ptr< osg::Camera > _camera
Definition: coVRStatsDisplay.h:86
const osg::Camera * getCamera() const
Definition: coVRStatsDisplay.h:51
unsigned int _threadingModelChildNum
Definition: coVRStatsDisplay.h:103
unsigned int _gpuMemChildNum
Definition: coVRStatsDisplay.h:99
float _statsWidth
Definition: coVRStatsDisplay.h:115
unsigned int _frameRateChildNum
Definition: coVRStatsDisplay.h:98
unsigned int _numBlocks
Definition: coVRStatsDisplay.h:112
virtual ~coVRStatsDisplay()
Definition: coVRStatsDisplay.h:28
unsigned int _rhrSkippedChildNum
Definition: coVRStatsDisplay.h:107
unsigned int _rhrFpsChildNum
Definition: coVRStatsDisplay.h:104
std::string _gpuName
Definition: coVRStatsDisplay.h:96
double getBlockMultiplier() const
Definition: coVRStatsDisplay.h:40
float _statsHeight
Definition: coVRStatsDisplay.h:116
StatsType
Definition: coVRStatsDisplay.h:30
Definition: coVRStatsDisplay.h:23
osg::ref_ptr< osg::Switch > _switch
Definition: coVRStatsDisplay.h:88
unsigned int _gpuUtilChildNum
Definition: coVRStatsDisplay.h:102
bool _initialized
Definition: coVRStatsDisplay.h:85
double _blockMultiplier
Definition: coVRStatsDisplay.h:113