From 735a20bc923d0a7bf4b0ca0e4d005413ca8de0f8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 25 Aug 2013 15:36:23 +0300 Subject: add code for image creation/deletion. --- src/resources/image.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/resources/image.cpp') diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 7f2fd6fbd..49650fef3 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -65,6 +65,10 @@ Image::Image(SDL_Surface *const image, const bool hasAlphaChannel0, mIsAlphaVisible(hasAlphaChannel0), mIsAlphaCalculated(false) { +#ifdef DEBUG_IMAGES + logger->log("created: %p", this); +#endif + mBounds.x = 0; mBounds.y = 0; @@ -102,6 +106,10 @@ Image::Image(const GLuint glimage, const int width, const int height, mIsAlphaVisible(true), mIsAlphaCalculated(false) { +#ifdef DEBUG_IMAGES + logger->log("created: %p", this); +#endif + mBounds.x = 0; mBounds.y = 0; mBounds.w = static_cast(width); @@ -121,6 +129,9 @@ Image::Image(const GLuint glimage, const int width, const int height, Image::~Image() { +#ifdef DEBUG_IMAGES + logger->log("delete: %p, %s, %s", this, mIdPath.c_str(), mSource.c_str()); +#endif unload(); } -- cgit v1.2.3-70-g09d2