From Paul Melis, fixed the setFrameStatsMode() method
This commit is contained in:
parent
46ce4c3df3
commit
850efd10f1
@ -52,7 +52,7 @@ class OSGPRODUCER_EXPORT ViewerEventHandler : public osgGA::GUIEventHandler
|
||||
CAMERA_STATS = 2
|
||||
};
|
||||
|
||||
void setFrameStatsMode(FrameStatsMode mode) { _frameStatsMode = mode; }
|
||||
void setFrameStatsMode(FrameStatsMode mode);
|
||||
FrameStatsMode getFrameStatsMode() { return _frameStatsMode; }
|
||||
|
||||
void setWriteImageOnNextFrame(bool writeImageOnNextFrame);
|
||||
|
@ -768,6 +768,18 @@ void ViewerEventHandler::setWriteImageFileName(const std::string& filename)
|
||||
}
|
||||
}
|
||||
|
||||
void ViewerEventHandler::setFrameStatsMode(FrameStatsMode mode)
|
||||
{
|
||||
_frameStatsMode = mode;
|
||||
if (_frameStatsMode==NO_STATS)
|
||||
{
|
||||
_cg->setInstrumentationMode(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
_cg->setInstrumentationMode(true);
|
||||
}
|
||||
}
|
||||
|
||||
bool ViewerEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa)
|
||||
{
|
||||
@ -780,15 +792,8 @@ bool ViewerEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActio
|
||||
{
|
||||
case 's' :
|
||||
{
|
||||
_frameStatsMode = (FrameStatsMode)((_frameStatsMode+1)%3);
|
||||
if (_frameStatsMode==NO_STATS)
|
||||
{
|
||||
_cg->setInstrumentationMode(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
_cg->setInstrumentationMode(true);
|
||||
}
|
||||
FrameStatsMode newFrameStatsMode = (FrameStatsMode)((_frameStatsMode+1)%3);
|
||||
setFrameStatsMode(newFrameStatsMode);
|
||||
return true;
|
||||
}
|
||||
case 'v' :
|
||||
|
Loading…
Reference in New Issue
Block a user