
#ifndef TEXTURECACHE_H
#define TEXTURECACHE_H TEXTURECACHE_H

#include <SDL.h>
#include <GL/gl.h>
#include <map>
#include <string>
#include "TextureLoader/TextureLoader.h"
#include "FileLoader/FileLoader.h"

class TextureCache : public TextureLoader
{
public:
    virtual ~TextureCache();
    virtual GLuint load(const FileLoader::Path & path,
            FileLoader & fileLoader, bool mipmaps = true,
            int mode = GL_DECAL, int quality = 1);

protected:
    /* methods */
    GLuint loadTexture(const FileLoader::Path & path,
            FileLoader & fileLoader, bool mipmaps,
            int mode, int quality);

    /* data */
    std::map< std::string, GLuint > m_cache;
};

#endif
