Fixed a bug where resizing FTGLTextureFont caused a GL error
diff --git a/src/FTGLTextureFont.cpp b/src/FTGLTextureFont.cpp
index 357593e..0b9e98e 100755
--- a/src/FTGLTextureFont.cpp
+++ b/src/FTGLTextureFont.cpp
@@ -142,6 +142,7 @@ bool FTGLTextureFont::FaceSize( const unsigned int size, const unsigned int res)
if( !textureIDList.empty())
{
glDeleteTextures( textureIDList.size(), (const GLuint*)&textureIDList[0]);
+ textureIDList.clear();
remGlyphs = numGlyphs = face.GlyphCount();
}
diff --git a/test/FTGLTextureFont-Test.cpp b/test/FTGLTextureFont-Test.cpp
index dd9b12c..52a9c8f 100644
--- a/test/FTGLTextureFont-Test.cpp
+++ b/test/FTGLTextureFont-Test.cpp
@@ -44,10 +44,10 @@ class FTGLTextureFontTest : public CppUnit::TestCase
CPPUNIT_ASSERT( textureFont->Error() == 0);
textureFont->FaceSize(18);
- textureFont->Render("blah");
+ textureFont->Render("first");
textureFont->FaceSize(38);
- textureFont->Render("blah");
+ textureFont->Render("second");
CPPUNIT_ASSERT( glGetError() == GL_NO_ERROR);
}