From 750d3348b363716cf82136c337dac5da06bf5390 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 14 May 2013 16:35:57 +0300 Subject: add into texture bind dubugging also bind count. --- src/gui/debugwindow.cpp | 20 +++++++++++++++++++- src/gui/debugwindow.h | 3 +++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp index 64ae18c36..4fe4fbe1b 100644 --- a/src/gui/debugwindow.cpp +++ b/src/gui/debugwindow.cpp @@ -173,6 +173,11 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) : mDrawCallsLabel(new Label(this, strprintf("%s %s", // TRANSLATORS: debug window label _("Draw calls:"), "?"))), +#endif +#ifdef DEBUG_BIND_TEXTURE + mBindsLabel(new Label(this, strprintf("%s %s", + // TRANSLATORS: debug window label + _("Texture binds:"), "?"))), #endif // TRANSLATORS: debug window label, frames per second mFPSLabel(new Label(this, strprintf(_("%d FPS"), 0))), @@ -219,7 +224,8 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) : place(0, 7, mParticleCountLabel, 2); place(0, 8, mMapActorCountLabel, 2); #ifdef USE_OPENGL -#if defined (DEBUG_OPENGL_LEAKS) || defined(DEBUG_DRAW_CALLS) +#if defined (DEBUG_OPENGL_LEAKS) || defined(DEBUG_DRAW_CALLS) \ + || defined(DEBUG_BIND_TEXTURE) int n = 9; #endif #ifdef DEBUG_OPENGL_LEAKS @@ -231,6 +237,10 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) : #endif #ifdef DEBUG_DRAW_CALLS place(0, n, mDrawCallsLabel, 2); + n ++; +#endif +#ifdef DEBUG_BIND_TEXTURE + place(0, n, mBindsLabel, 2); #endif #endif place.getCell().matchColWidth(0, 0); @@ -300,6 +310,14 @@ void MapDebugTab::logic() _("Draw calls:"), mainGraphics->getDrawCalls())); } #endif +#ifdef DEBUG_BIND_TEXTURE + if (mainGraphics) + { + mBindsLabel->setCaption(strprintf("%s %d", + // TRANSLATORS: debug window label + _("Texture binds:"), mainGraphics->getBinds())); + } +#endif #endif } } diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h index 7fd94f990..26bedf9ce 100644 --- a/src/gui/debugwindow.h +++ b/src/gui/debugwindow.h @@ -74,6 +74,9 @@ class MapDebugTab final : public DebugTab int mUpdateTime; #ifdef DEBUG_DRAW_CALLS Label *mDrawCallsLabel; +#endif +#ifdef DEBUG_BIND_TEXTURE + Label *mBindsLabel; #endif Label *mFPSLabel; Label *mLPSLabel; -- cgit v1.2.3-70-g09d2