usata-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Usata-commits] Changes to usata2/src/texture.cpp


From: David Lau
Subject: [Usata-commits] Changes to usata2/src/texture.cpp
Date: Wed, 19 Jan 2005 21:18:16 -0500

Index: usata2/src/texture.cpp
diff -u usata2/src/texture.cpp:1.9 usata2/src/texture.cpp:1.10
--- usata2/src/texture.cpp:1.9  Thu Jan 20 01:15:09 2005
+++ usata2/src/texture.cpp      Thu Jan 20 02:18:15 2005
@@ -10,7 +10,7 @@
 // included in the software distribution, or visit
 // http://www.fsf.org/licenses/gpl.html.
 //
-// $Id: texture.cpp,v 1.9 2005/01/20 01:15:09 skunix Exp $
+// $Id: texture.cpp,v 1.10 2005/01/20 02:18:15 skunix Exp $
 
 #include <boost/scoped_array.hpp>
 #include <boost/tuple/tuple.hpp>
@@ -109,7 +109,8 @@
 }
 
 TextureMeta::TextureMeta(const boost::filesystem::path& p)
-: filepath(p)
+:      filepath(p),
+       compress(true)
 {
 
 }
@@ -208,7 +209,8 @@
 }
 
 TextureMap::TextureMap(const TextureMeta& tm)
-:      m_gl_texture_type(GL_TEXTURE_2D)
+:      m_meta(tm),
+       m_gl_texture_type(GL_TEXTURE_2D)
 {
        const TextureMeta* meta = &tm;
        m_pixmap.reset(
@@ -221,6 +223,10 @@
 
 TextureMap::~TextureMap()
 {
+       if (tex_id!=0)
+       {
+               glDeleteTextures(1,&tex_id);
+       }
        return;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]