26 lines
468 B
C++
26 lines
468 B
C++
|
|
#ifndef TEXTURECACHE_H
|
|
#define TEXTURECACHE_H TEXTURECACHE_H
|
|
|
|
#include <GL/gl.h>
|
|
#include <map>
|
|
#include <string>
|
|
|
|
class TextureCache
|
|
{
|
|
public:
|
|
GLuint load(const std::string & filename);
|
|
|
|
private:
|
|
/* methods */
|
|
GLuint loadTexture(const char * filename,
|
|
bool mipmaps = false,
|
|
int mode = GL_DECAL,
|
|
int quality = 1);
|
|
|
|
/* data */
|
|
std::map< std::string, GLuint > m_cache;
|
|
};
|
|
|
|
#endif
|