00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 // Copyright (C) 2010 Daniele Giannetti 00013 // 00014 // This file is part of VR3Lib. 00015 // The VR3Lib is free software, but is distributed in the static precompiled 00016 // version as it is NOT open source. The VR3Lib may be used in any virtual 00017 // reality application free of charge, but it must be clearly stated that this 00018 // library is used in the application EULA and distribution license 00019 // (for both free and proprietary applications). 00021 00022 #ifndef __VR3TEXTURE_H__ 00023 #define __VR3TEXTURE_H__ 00024 00025 #include <string> 00026 00028 00036 class VR3Texture { 00038 friend class VR3Scene; 00040 friend class VR3Mesh; 00042 friend class VR3Material; 00044 friend class VR3Background; 00046 friend class VR3TextureManager; 00047 00049 GLuint m_tex; 00051 std::string m_texfile; 00053 GLenum m_textype; 00054 //-------------------------------- Destructor --------------------------------// 00055 00057 00058 00060 00065 ~VR3Texture(); 00066 00068 00070 VR3Texture(const VR3Texture&); 00072 VR3Texture& operator = (const VR3Texture&); 00073 00074 public: 00075 00076 //------------------------------- Constructor --------------------------------// 00077 00079 00080 00082 00090 VR3Texture(const char* file_name, GLenum tex_type = VR3TEX_2D); 00091 00093 00094 //--------------------------- Destroying Function ----------------------------// 00095 00097 00098 00100 00110 void Destroy(); 00111 00112 //--------------------------- Activation Function ----------------------------// 00113 00115 00116 00118 00135 void Activate(unsigned int unit_id); 00136 00138 00139 //----------------------------- Get Functions --------------------------------// 00140 00142 00143 00145 00151 GLenum GetType() 00152 { return m_textype; } 00153 00155 00163 const char* GetFileName() 00164 { return m_texfile.c_str(); } 00165 00167 00168 }; 00169 00170 #endif