diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-16 22:20:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-16 23:53:59 +0300 |
commit | f68cbf700a99f2f184715a5b8025bcb4b6525391 (patch) | |
tree | c70dace07f65fc8a06c18fe3c05baaff6ba02fbf /src/openglgraphics.cpp | |
parent | 07e401fb2335d2372a93f37317f144449f7e872b (diff) | |
download | manaverse-f68cbf700a99f2f184715a5b8025bcb4b6525391.tar.gz manaverse-f68cbf700a99f2f184715a5b8025bcb4b6525391.tar.bz2 manaverse-f68cbf700a99f2f184715a5b8025bcb4b6525391.tar.xz manaverse-f68cbf700a99f2f184715a5b8025bcb4b6525391.zip |
Extend bing texture logging.
Diffstat (limited to 'src/openglgraphics.cpp')
-rw-r--r-- | src/openglgraphics.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp index 08a88f4f6..e53f4e11b 100644 --- a/src/openglgraphics.cpp +++ b/src/openglgraphics.cpp @@ -56,7 +56,12 @@ OpenGLGraphics::OpenGLGraphics(): mColorAlpha(false), mFboId(0), mTextureId(0), +#ifdef DEBUG_BIND_TEXTURE + mRboId(0), + mOldTextureId(0) +#else mRboId(0) +#endif { mOpenGL = 1; mName = "fast OpenGL"; @@ -1400,11 +1405,13 @@ void OpenGLGraphics::debugBindTexture(const Image *image) const std::string texture = image->getIdPath(); if (mOldTexture != texture) { - if (!mOldTexture.empty() && !texture.empty()) + if (!mOldTexture.empty() && !texture.empty() + && mOldTextureId != image->mGLImage) { - logger->log("bind: %s to %s", mOldTexture.c_str(), - texture.c_str()); + logger->log("bind: %s (%d) to %s (%d)", mOldTexture.c_str(), + mOldTextureId, texture.c_str(), image->mGLImage); } + mOldTextureId = image->mGLImage; mOldTexture = texture; } } |