From 7d24b0dd32fafa7a85724400d525c5ee7923d0ba Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 25 Sep 2012 22:00:21 +0300 Subject: Show in resource releases texture id. --- src/resources/image.h | 3 +++ src/resources/resourcemanager.cpp | 14 ++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'src/resources') diff --git a/src/resources/image.h b/src/resources/image.h index 2ba7890ab..11d3828fd 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -149,6 +149,9 @@ class Image : public Resource int getTextureHeight() const { return mTexHeight; } + + GLuint getGLImage() const + { return mGLImage; } #endif bool isHasAlphaChannel() const diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index d6e66ff7e..aae5c3db7 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -211,7 +211,21 @@ bool ResourceManager::cleanOrphans(const bool always) } else { +#ifdef USE_OPENGL + const Image *const image = dynamic_cast(res); + if (image && image->getGLImage()) + { + logger->log("ResourceManager::release(%s, %u)", + res->mIdPath.c_str(), image->getGLImage()); + } + else + { + logger->log("ResourceManager::release(%s)", + res->mIdPath.c_str()); + } +#else logger->log("ResourceManager::release(%s)", res->mIdPath.c_str()); +#endif const ResourceIterator toErase = iter; ++iter; mOrphanedResources.erase(toErase); -- cgit v1.2.3-70-g09d2