]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Texture.cpp
add include guard to Texture.h
[lugaru.git] / Source / Texture.cpp
index 37d4073b0a862e2f8488e816e00618572070b1f4..92c69d5c93c82472c92511c4cfa754884e610efb 100644 (file)
@@ -9,6 +9,12 @@ map<string,Texture> Texture::textures;
 extern TGAImageRec texture;
 extern bool trilinear;
 
+Texture::~Texture()  {
+       free(array);
+       if(id)
+               glDeleteTextures(1,&id);
+}
+
 void Texture::load()  {
        GLuint type;