move stats formatting to RageDisplay, so renderers can add custom stats

This commit is contained in:
Glenn Maynard
2004-11-05 04:15:06 +00:00
parent e0b211aca6
commit 3d084e2a2c
3 changed files with 11 additions and 9 deletions
+9
View File
@@ -98,6 +98,15 @@ void RageDisplay::ResetStats()
g_LastCheckTimer.GetDeltaTime();
}
CString RageDisplay::GetStats() const
{
/* If FPS == 0, we don't have stats yet. */
if( !GetFPS() )
return "-- FPS\n-- av FPS\n-- VPF";
return ssprintf( "%i FPS\n%i av FPS\n%i VPF", GetFPS(), GetCumFPS(), GetVPF() );
}
void RageDisplay::StatsAddVerts( int iNumVertsRendered ) { g_iVertsRenderedSinceLastCheck += iNumVertsRendered; }
/* Draw a line as a quad. GL_LINES with SmoothLines off can draw line