diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-14 16:35:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-14 16:35:57 +0300 |
commit | 750d3348b363716cf82136c337dac5da06bf5390 (patch) | |
tree | 29aed9c17d6121f77f9a48a0c570954d79a5aa81 /src/normalopenglgraphics.cpp | |
parent | 595cd8cf3c1013f2ae20b118655f667a6c24c452 (diff) | |
download | manaplus-750d3348b363716cf82136c337dac5da06bf5390.tar.gz manaplus-750d3348b363716cf82136c337dac5da06bf5390.tar.bz2 manaplus-750d3348b363716cf82136c337dac5da06bf5390.tar.xz manaplus-750d3348b363716cf82136c337dac5da06bf5390.zip |
add into texture bind dubugging also bind count.
Diffstat (limited to 'src/normalopenglgraphics.cpp')
-rw-r--r-- | src/normalopenglgraphics.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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), @@ -1028,6 +1032,10 @@ void NormalOpenGLGraphics::updateScreen() mLastDrawCalls = mDrawCalls; mDrawCalls = 0; #endif +#ifdef DEBUG_BIND_TEXTURE + mLastBinds = mBinds; + mBinds = 0; +#endif SDL_GL_SwapBuffers(); // may be need clear? // glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); @@ -1361,6 +1369,9 @@ void NormalOpenGLGraphics::bindTexture(const GLenum target, { mLastImage = texture; glBindTexture(target, texture); +#ifdef DEBUG_BIND_TEXTURE + mBinds ++; +#endif } } |