• Página principal
  • Clases
  • Archivos
  • Lista de archivos

OpenGLTextureMap.h

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;       //hash con los id's de las texturas de opengl segun la ruta del archivo
00050         map<string, GLuint> _oTexturesMapClamp; //hash con los id's de las texturas de opengl segun la ruta del archivo
00051         GLuint LoadTexture(string strTextureName, bool clamp); //devuelve el ID de la textura en openGL, devuelve 0 en caso de error
00052 };

Generado el Miércoles, 15 de Septiembre de 2010 14:56:31 para CGALib por  doxygen 1.7.1