Commit a0cf851ce2aff8ff9a6b99658d65052ddfb76d4a

henry 2002-10-23T07:04:34

Minor formatting and moved Push Attribs to the font

diff --git a/src/FTGLPixmapFont.cpp b/src/FTGLPixmapFont.cpp
index ac35f34..310075d 100755
--- a/src/FTGLPixmapFont.cpp
+++ b/src/FTGLPixmapFont.cpp
@@ -44,7 +44,8 @@ void FTGLPixmapFont::render( const char* string)
 void FTGLPixmapFont::render( const wchar_t* string)
 {   
     glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT);
-
+    glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT);
+        
     glEnable(GL_BLEND);
     glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     
@@ -52,6 +53,7 @@ void FTGLPixmapFont::render( const wchar_t* string)
 
     FTFont::render( string);
 
+    glPopClientAttrib();
     glPopAttrib();
 
 }
diff --git a/src/FTPixmapGlyph.cpp b/src/FTPixmapGlyph.cpp
index 2a880bb..dba7e6b 100755
--- a/src/FTPixmapGlyph.cpp
+++ b/src/FTPixmapGlyph.cpp
@@ -100,19 +100,15 @@ float FTPixmapGlyph::Render( const FT_Vector& pen)
 {
     if( data)
     {
-        glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT);
-        
         // Move the glyph origin
-        glBitmap( 0, 0, 0.0, 0.0, pen.x + pos.x, pen.y - pos.y, (const GLubyte *)0);
+        glBitmap( 0, 0, 0.0, 0.0, pen.x + pos.x, pen.y - pos.y, (const GLubyte*)0);
 
         glPixelStorei( GL_UNPACK_ROW_LENGTH, destWidth);
 
         glDrawPixels( destWidth, destHeight, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid*)data);
         
         // Restore the glyph origin
-        glBitmap( 0, 0, 0.0, 0.0, -pen.x - pos.x, -pen.y + pos.y, (const GLubyte *)0);
-
-        glPopClientAttrib();
+        glBitmap( 0, 0, 0.0, 0.0, -pen.x - pos.x, -pen.y + pos.y, (const GLubyte*)0);
     }
 
     return advance;