Delete the display list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
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)