#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;
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;