00001 #pragma once
00002
00003 #include <string>
00004 #include <map>
00005
00006 #ifdef __APPLE__
00007 #include <OpenGL/gl.h>
00008 #else
00009 #ifdef _WIN32
00010 #include <windows.h>
00011 #endif
00012 #include <GL/gl.h>
00013 #endif
00014
00015 using namespace std;
00016
00021 class OpenGLTextureMap
00022 {
00023
00024 public:
00027 static OpenGLTextureMap* getInstance();
00028
00041 GLuint GetTextureID(string strTextureName, string strTextureBasePath, bool bIgnorePath, bool bClamp = false);
00042 virtual ~OpenGLTextureMap();
00043
00044 private:
00045 OpenGLTextureMap();
00046
00047 private:
00048 static OpenGLTextureMap* instance;
00049 map<string, GLuint> _oTexturesMapNoClamp;
00050 map<string, GLuint> _oTexturesMapClamp;
00051 GLuint LoadTexture(string strTextureName, bool clamp);
00052 };