Cleaned up and simplified the code relating to the fps display

pull/21/head
Jacob Essex 13 years ago
parent 18e4b73a86
commit 3b15170d09

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

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

Loading…
Cancel
Save