Commit e4b164cf61271c7f24b45e2c2f4fc148f2fb618f

henry 2002-12-21T07:32:40

Delete the display list

diff --git a/src/FTExtrdGlyph.cpp b/src/FTExtrdGlyph.cpp
index 48e985e..4a72bfa 100644
--- a/src/FTExtrdGlyph.cpp
+++ b/src/FTExtrdGlyph.cpp
@@ -104,7 +104,9 @@ FTExtrdGlyph::FTExtrdGlyph( FT_Glyph glyph, float d)
 
 
 FTExtrdGlyph::~FTExtrdGlyph()
-{}
+{
+    glDeleteLists( glList, 1);
+}
 
 
 float FTExtrdGlyph::Render( const FTPoint& pen)
diff --git a/src/FTOutlineGlyph.cpp b/src/FTOutlineGlyph.cpp
index 2e00c25..d2d290f 100644
--- a/src/FTOutlineGlyph.cpp
+++ b/src/FTOutlineGlyph.cpp
@@ -43,7 +43,9 @@ FTOutlineGlyph::FTOutlineGlyph( FT_Glyph glyph)
 
 
 FTOutlineGlyph::~FTOutlineGlyph()
-{}
+{
+    glDeleteLists( glList, 1);
+}
 
 
 float FTOutlineGlyph::Render( const FTPoint& pen)
diff --git a/src/FTPolyGlyph.cpp b/src/FTPolyGlyph.cpp
index b062f24..dded757 100644
--- a/src/FTPolyGlyph.cpp
+++ b/src/FTPolyGlyph.cpp
@@ -13,15 +13,15 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph)
 
     FTVectoriser* vectoriser = new FTVectoriser( glyph);
 
-    if ( ( vectoriser->ContourCount() < 1) || ( vectoriser->PointCount() < 3))
+    if(( vectoriser->ContourCount() < 1) || ( vectoriser->PointCount() < 3))
     {
         delete vectoriser;
         return;
     }
 
-    vectoriser->MakeMesh(1.0);
+    vectoriser->MakeMesh( 1.0);
     
-    glList = glGenLists(1);
+    glList = glGenLists( 1);
     glNewList( glList, GL_COMPILE);
 
         const FTMesh* mesh = vectoriser->GetMesh();
@@ -41,13 +41,14 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph)
         }
     glEndList();
 
-    // discard glyph image (bitmap or not)
-    FT_Done_Glyph( glyph); // Why does this have to be HERE
+    FT_Done_Glyph( glyph);
 }
 
 
 FTPolyGlyph::~FTPolyGlyph()
-{}
+{
+    glDeleteLists( glList, 1);
+}
 
 
 float FTPolyGlyph::Render( const FTPoint& pen)