00001 /* Crown and Cutlass 00002 * TextureResource Header 00003 */ 00004 00005 #if !defined ( _TEXTURE_RESOURCE_H_ ) 00006 #define _TEXTURE_RESOURCE_H_ 00007 00008 #include <string> 00009 #include "../GLee.h" 00010 #include "IResource.h" 00011 00012 class TextureResource: public IResource { 00013 public: 00014 TextureResource(std::string name, std::string filename, GLuint tileMode, bool genMipMaps, bool tryCompress, bool tryAlpha); 00015 ~TextureResource(); 00016 00017 std::string GetType(); 00018 00019 void Load(); 00020 void Unload(); 00021 00022 GLuint GetTexture(); 00023 00024 static const std::string s_type; 00025 00026 private: 00027 bool m_loaded; 00028 std::string m_filename; 00029 00030 GLuint m_texture; 00031 GLuint m_tileMode; // eg GL_REPEAT, GL_CLAMP 00032 bool m_genMipMaps; 00033 bool m_tryCompress; 00034 bool m_tryAlpha; 00035 }; 00036 00037 #endif
1.4.7