Unified Messaging Subsystem
[supertux.git] / src / video / texture_manager.cpp
index ab5788e..56ec74b 100644 (file)
@@ -6,12 +6,15 @@
 #include <SDL.h>
 #include <SDL_image.h>
 #include <GL/gl.h>
+#include <GL/glext.h>
 #include <iostream>
 #include <sstream>
 #include <stdexcept>
 #include "physfs/physfs_sdl.hpp"
 #include "image_texture.hpp"
 #include "glutil.hpp"
+#include "file_system.hpp"
+#include "msg.hpp"
 
 TextureManager* texture_manager = NULL;
 
@@ -25,16 +28,15 @@ TextureManager::~TextureManager()
       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");
     delete i->second;
   }
 }
 
 ImageTexture*
-TextureManager::get(const std::string& filename)
+TextureManager::get(const std::string& _filename)
 {
+  std::string filename = FileSystem::normalize(_filename);
   ImageTextures::iterator i = image_textures.find(filename);
 
   ImageTexture* texture = NULL;