summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-14 16:35:57 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-14 16:35:57 +0300
commit750d3348b363716cf82136c337dac5da06bf5390 (patch)
tree29aed9c17d6121f77f9a48a0c570954d79a5aa81 /src/gui
parent595cd8cf3c1013f2ae20b118655f667a6c24c452 (diff)
downloadmanaverse-750d3348b363716cf82136c337dac5da06bf5390.tar.gz
manaverse-750d3348b363716cf82136c337dac5da06bf5390.tar.bz2
manaverse-750d3348b363716cf82136c337dac5da06bf5390.tar.xz
manaverse-750d3348b363716cf82136c337dac5da06bf5390.zip
add into texture bind dubugging also bind count.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/debugwindow.cpp20
-rw-r--r--src/gui/debugwindow.h3
2 files changed, 22 insertions, 1 deletions
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
@@ -174,6 +174,11 @@ MapDebugTab::MapDebugTab(const Widget2 *const widget) :
// 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))),
// TRANSLATORS: debug window label, logic per second
@@ -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
@@ -75,6 +75,9 @@ class MapDebugTab final : public DebugTab
#ifdef DEBUG_DRAW_CALLS
Label *mDrawCallsLabel;
#endif
+#ifdef DEBUG_BIND_TEXTURE
+ Label *mBindsLabel;
+#endif
Label *mFPSLabel;
Label *mLPSLabel;
std::string mFPSText;