Got rid of debug fps counter, just added deltatime into usual fps counter
This commit is contained in:
parent
2c7a527030
commit
bc84326ca2
@ -2198,7 +2198,6 @@ void GameView::OnDraw()
|
||||
if(showHud && introText < 51)
|
||||
{
|
||||
//FPS and some version info
|
||||
#ifndef DEBUG //In debug mode, the Engine will draw FPS and other info instead
|
||||
std::stringstream fpsInfo;
|
||||
fpsInfo.precision(2);
|
||||
#ifdef SNAPSHOT
|
||||
@ -2207,6 +2206,9 @@ void GameView::OnDraw()
|
||||
fpsInfo << "Beta " << SAVE_VERSION << "." << MINOR_VERSION << "." << BUILD_NUM << ", ";
|
||||
#endif
|
||||
fpsInfo << "FPS: " << std::fixed << ui::Engine::Ref().GetFps();
|
||||
#ifdef DEBUG
|
||||
fpsInfo << " Delta: " << std::fixed << ui::Engine::Ref().GetDelta();
|
||||
#endif
|
||||
|
||||
if (showDebug)
|
||||
fpsInfo << " Parts: " << sample.NumParts;
|
||||
@ -2221,7 +2223,6 @@ void GameView::OnDraw()
|
||||
int alpha = 255-introText*5;
|
||||
g->fillrect(12, 12, textWidth+8, 15, 0, 0, 0, alpha*0.5);
|
||||
g->drawtext(16, 16, (const char*)fpsInfo.str().c_str(), 32, 216, 255, alpha*0.75);
|
||||
#endif
|
||||
}
|
||||
|
||||
//Tooltips
|
||||
|
@ -232,11 +232,6 @@ void Engine::Draw()
|
||||
if(state_)
|
||||
state_->DoDraw();
|
||||
|
||||
#ifdef DEBUG
|
||||
char fpsText[512];
|
||||
sprintf(fpsText, "FPS: %.2f, Delta: %.3f", fps, dt);
|
||||
ui::Engine::Ref().g->drawtext(10, 10, fpsText, 255, 255, 255, 255);
|
||||
#endif
|
||||
g->Finalise();
|
||||
g->Release();
|
||||
FrameIndex++;
|
||||
|
@ -54,6 +54,7 @@ namespace ui
|
||||
|
||||
void SetFps(float fps);
|
||||
inline float GetFps() { return fps; }
|
||||
inline float GetDelta() { return dt; }
|
||||
|
||||
inline int GetMouseButton() { return mouseb_; }
|
||||
inline int GetMouseX() { return mousex_; }
|
||||
|
Reference in New Issue
Block a user