/*
Copyright (C) 2003, 2010 - Wolfire Games
+Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
#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
{
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