]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Texture.h
Moved Account::active in Account class. Maybe it should be changed for a method and...
[lugaru.git] / Source / Texture.h
index e9642b9b047694b8cd57339d7a3e5ecf849c0d08..95547bf30e9ec9e9b494495af2442e6d7f12c594 100644 (file)
@@ -26,7 +26,27 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 #include <string>
 using namespace std;
 
-class TextureRes;
+class TextureRes
+{
+private:
+    static vector<TextureRes*> list;
+
+    GLuint id;
+    string filename;
+    bool hasMipmap;
+    bool isSkin;
+    int skinsize;
+    GLubyte* data;
+    int datalen;
+
+    void load();
+
+public:
+    TextureRes(const string& filename, bool hasMipmap);
+    TextureRes(const string& filename, bool hasMipmap, GLubyte* array, int* skinsize);
+    ~TextureRes();
+    void bind();
+};
 
 class Texture
 {
@@ -34,12 +54,10 @@ private:
     TextureRes* tex;
 public:
     inline Texture(): tex(NULL) {}
-    void load(const string& filename, bool hasMipmap, bool hasAlpha);
+    void load(const string& filename, bool hasMipmap);
     void load(const string& filename, bool hasMipmap, GLubyte* array, int* skinsizep);
     void destroy();
     void bind();
-
-    static void reloadAll();
 };
 
 #endif