1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-19 03:39:58 +00:00

Cleaned up and simplified the code relating to the fps display

This commit is contained in:
Jacob Essex 2012-01-16 18:16:33 +00:00
parent 18e4b73a86
commit 3b15170d09
2 changed files with 5 additions and 13 deletions

View File

@ -113,17 +113,10 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
} }
// update GUI // update GUI
if(mFpsLevel == 1)
{
mEnvironment.mWindowManager->wmSetFPS(mOgre->getFPS());
}
else if(mFpsLevel == 2) //detailed
{
Ogre::RenderWindow* window = mOgre->getWindow(); Ogre::RenderWindow* window = mOgre->getWindow();
mEnvironment.mWindowManager->wmSetDetailedFPS(window->getLastFPS(), mEnvironment.mWindowManager->wmUpdateFps(window->getLastFPS(),
window->getTriangleCount(), window->getTriangleCount(),
window->getBatchCount()); window->getBatchCount());
}
mEnvironment.mWindowManager->onFrame(mEnvironment.mFrameDuration); mEnvironment.mWindowManager->onFrame(mEnvironment.mFrameDuration);

View File

@ -205,8 +205,7 @@ namespace MWGui
MyGUI::Gui* getGui() const { return gui; } MyGUI::Gui* getGui() const { return gui; }
void wmSetFPS(float fps) { mFPS = fps; } void wmUpdateFps(float fps, size_t triangleCount, size_t batchCount)
void wmSetDetailedFPS(float fps, size_t triangleCount, size_t batchCount)
{ {
mFPS = fps; mFPS = fps;
mTriangleCount = triangleCount; mTriangleCount = triangleCount;