More precise polygon count, as requested by Kinsu

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8333 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-04-13 12:43:58 +00:00
parent eb47abe977
commit 4023a0bb49

View File

@ -933,8 +933,8 @@ void IrrDriver::displayFPS()
// Ask for current frames per second and last number of triangles processed (trimed to thousands)
const int fps = m_device->getVideoDriver()->getFPS();
const int kilotris = (int)(m_device->getVideoDriver()->getPrimitiveCountDrawn(0)
* (1.f / 1000.f) );
const float kilotris = m_device->getVideoDriver()->getPrimitiveCountDrawn(0)
* (1.f / 1000.f);
// Min and max info tracking, per mode, so user can check game vs menus
bool current_state = StateManager::get()->getGameState() == GUIEngine::GAME;
@ -955,7 +955,15 @@ void IrrDriver::displayFPS()
if (max < fps) max = fps;
static char buffer[32];
sprintf(buffer, "FPS: %i/%i/%i - %i KTris", min, fps, max, kilotris);
if (UserConfigParams::m_artist_debug_mode)
{
sprintf(buffer, "FPS: %i/%i/%i - %.2f KTris", min, fps, max, kilotris);
}
else
{
sprintf(buffer, "FPS: %i/%i/%i - %i KTris", min, fps, max, (int)round(kilotris));
}
core::stringw fpsString = buffer;