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/normalopenglgraphics.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/normalopenglgraphics.cpp') diff --git a/src/normalopenglgraphics.cpp b/src/normalopenglgraphics.cpp index 90ba0a188..af13d0a4f 100644 --- a/src/normalopenglgraphics.cpp +++ b/src/normalopenglgraphics.cpp @@ -44,6 +44,10 @@ GLuint NormalOpenGLGraphics::mLastImage = 0; unsigned int NormalOpenGLGraphics::mDrawCalls = 0; unsigned int NormalOpenGLGraphics::mLastDrawCalls = 0; #endif +#ifdef DEBUG_BIND_TEXTURE +unsigned int NormalOpenGLGraphics::mBinds = 0; +unsigned int NormalOpenGLGraphics::mLastBinds = 0; +#endif NormalOpenGLGraphics::NormalOpenGLGraphics(): mFloatTexArray(nullptr), @@ -1027,6 +1031,10 @@ void NormalOpenGLGraphics::updateScreen() #ifdef DEBUG_DRAW_CALLS mLastDrawCalls = mDrawCalls; mDrawCalls = 0; +#endif +#ifdef DEBUG_BIND_TEXTURE + mLastBinds = mBinds; + mBinds = 0; #endif SDL_GL_SwapBuffers(); // may be need clear? @@ -1361,6 +1369,9 @@ void NormalOpenGLGraphics::bindTexture(const GLenum target, { mLastImage = texture; glBindTexture(target, texture); +#ifdef DEBUG_BIND_TEXTURE + mBinds ++; +#endif } } -- cgit v1.2.3-60-g2f50