summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-16 22:20:29 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-16 23:53:59 +0300
commitf68cbf700a99f2f184715a5b8025bcb4b6525391 (patch)
treec70dace07f65fc8a06c18fe3c05baaff6ba02fbf
parent07e401fb2335d2372a93f37317f144449f7e872b (diff)
downloadmv-f68cbf700a99f2f184715a5b8025bcb4b6525391.tar.gz
mv-f68cbf700a99f2f184715a5b8025bcb4b6525391.tar.bz2
mv-f68cbf700a99f2f184715a5b8025bcb4b6525391.tar.xz
mv-f68cbf700a99f2f184715a5b8025bcb4b6525391.zip
Extend bing texture logging.
-rw-r--r--src/openglgraphics.cpp13
-rw-r--r--src/openglgraphics.h1
2 files changed, 11 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;
}
}
diff --git a/src/openglgraphics.h b/src/openglgraphics.h
index eeb875a01..3eaf19045 100644
--- a/src/openglgraphics.h
+++ b/src/openglgraphics.h
@@ -166,6 +166,7 @@ class OpenGLGraphics : public Graphics
GLuint mRboId;
#ifdef DEBUG_BIND_TEXTURE
std::string mOldTexture;
+ unsigned mOldTextureId;
#endif
};
#endif