FTGLBitmapFont.cxx

Go to the documentation of this file.
00001 #include "FTGLBitmapFont.h"
00002 #include "FTBitmapGlyph.h"
00003 
00004 
00005 FTGLBitmapFont::FTGLBitmapFont( const char* fontFilePath)
00006 :   FTFont( fontFilePath)
00007 {}
00008 
00009 
00010 FTGLBitmapFont::FTGLBitmapFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
00011 :   FTFont( pBufferBytes, bufferSizeInBytes)
00012 {}
00013 
00014 
00015 FTGLBitmapFont::~FTGLBitmapFont()
00016 {}
00017 
00018 
00019 FTGlyph* FTGLBitmapFont::MakeGlyph( unsigned int g)
00020 {
00021     FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_DEFAULT);
00022 
00023     if( ftGlyph)
00024     {
00025         FTBitmapGlyph* tempGlyph = new FTBitmapGlyph( ftGlyph);
00026         return tempGlyph;
00027     }
00028 
00029     err = face.Error();
00030     return NULL;
00031 }
00032 
00033 
00034 void FTGLBitmapFont::PreRender()
00035 {
00036     FTFont::PreRender();
00037     glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT);
00038     glPushAttrib( GL_ENABLE_BIT);
00039     
00040     glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE);
00041     glPixelStorei( GL_UNPACK_ALIGNMENT, 1);
00042 
00043     glDisable( GL_BLEND);
00044 }
00045 
00046 
00047 void FTGLBitmapFont::PostRender()
00048 {
00049     glPopAttrib();
00050     glPopClientAttrib();
00051     FTFont::PostRender();
00052 }

Generated on Tue Jul 5 14:16:16 2011 for ROOT_528-00b_version by  doxygen 1.5.1