]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Texture.h
Reading debug mode from config again, but command line option overrides it
[lugaru.git] / Source / Texture.h
index 09d3a01ab504e54fd4760542cf86835f7277a466..95547bf30e9ec9e9b494495af2442e6d7f12c594 100644 (file)
@@ -1,5 +1,6 @@
 /*
 Copyright (C) 2003, 2010 - Wolfire Games
+Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
 
 This file is part of Lugaru.
 
@@ -25,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
 {
@@ -33,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