X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FTexture.h;h=f50af0eef4c44c32bad01637a749cd0c3fd903db;hb=cfdbe0ad0521045b27a60dbb1c963ea6dfdcda5a;hp=4424cee68a47656c785d5297d82aa1655598b574;hpb=01a48eb9a98fa8c7d407077aa69d493e74eb86cd;p=lugaru.git diff --git a/Source/Texture.h b/Source/Texture.h index 4424cee..f50af0e 100644 --- a/Source/Texture.h +++ b/Source/Texture.h @@ -1,8 +1,10 @@ +#ifndef _TEXTURE_H_ +#define _TEXTURE_H_ + #include #include //keeps track of which textures are loaded -//TODO: delete them properly class Texture { private: static std::map textures; @@ -22,9 +24,7 @@ class Texture { Texture(): isSkin(false), skinsize(0), arraySize(0), fileName(""), id(0), mipmap(false), hasalpha(false), array(NULL) { } - ~Texture() { - free(array); - } + ~Texture(); Texture (const std::string& _fileName, bool _mipmap, bool _hasalpha): isSkin(false), skinsize(0), arraySize(0), array(NULL), fileName(_fileName), id(0), mipmap(_mipmap), hasalpha(_hasalpha) { } @@ -37,3 +37,4 @@ class Texture { static GLuint Load(const std::string& fileName, bool mipmap, bool hasalpha, GLubyte* array, int* skinsize); }; +#endif