#include "image_texture.hpp"
#include "glutil.hpp"
#include "file_system.hpp"
+#include "msg.hpp"
TextureManager* texture_manager = NULL;
i != image_textures.end(); ++i) {
if(i->second == NULL)
continue;
-#ifdef DEBUG
- std::cerr << "Warning: Texture '" << i->first << "' not freed\n";
-#endif
+ msg_warning << "Texture '" << i->first << "' not freed" << std::endl;
delete i->second;
}
}
void
TextureManager::release(ImageTexture* texture)
{
- image_textures[texture->filename] = NULL;
+ image_textures.erase(texture->filename);
delete texture;
}