mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 21:32:42 +00:00
Report OSG rendering stats
This commit is contained in:
parent
9124a18bb6
commit
db0ad8421f
@ -908,7 +908,14 @@ void OMW::Engine::go()
|
||||
if (stats)
|
||||
{
|
||||
const auto frameNumber = mViewer->getFrameStamp()->getFrameNumber();
|
||||
mViewer->getViewerStats()->report(stats, frameNumber);
|
||||
if (frameNumber >= 2)
|
||||
{
|
||||
mViewer->getViewerStats()->report(stats, frameNumber - 2);
|
||||
osgViewer::Viewer::Cameras cameras;
|
||||
mViewer->getCameras(cameras);
|
||||
for (auto camera : cameras)
|
||||
camera->getStats()->report(stats, frameNumber - 2);
|
||||
}
|
||||
}
|
||||
|
||||
mEnvironment.limitFrameRate(frameTimer.time_s());
|
||||
|
Loading…
x
Reference in New Issue
Block a user