Added support for multiple graphics contexts, submission from Max Rhiener.

Alas changed the indenting to use 4 spaces instead of tabs, this irons out
differences when working under Windows and Unix, keeping the identing
consistent.
This commit is contained in:
Robert Osfield
2002-01-18 22:25:51 +00:00
parent 58ead9aead
commit 4fbf4db42e
39 changed files with 2579 additions and 2443 deletions

View File

@@ -1,7 +1,7 @@
#include "FTGLPolygonFont.h"
#include "FTGlyphContainer.h"
#include "FTGL.h"
#include "FTPolyGlyph.h"
#include "FTGLPolygonFont.h"
#include "FTGlyphContainer.h"
#include "FTGL.h"
#include "FTPolyGlyph.h"
@@ -13,22 +13,25 @@ FTGLPolygonFont::~FTGLPolygonFont()
{}
bool FTGLPolygonFont::MakeGlyphList()
// mrn@changes
bool FTGLPolygonFont::MakeGlyphList( unsigned int renderContext)
{
for( unsigned int n = 0; n < numGlyphs; ++n)
{
FT_Glyph* ftGlyph = face.Glyph( n, FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP);
if( ftGlyph)
{
FTPolyGlyph* tempGlyph = new FTPolyGlyph( *ftGlyph);
glyphList->Add( tempGlyph);
}
else
{
err = face.Error();
}
}
return !err;
FTGlyphContainer* glyphList=_contextGlyphList[renderContext];
for( unsigned int n = 0; n < numGlyphs; ++n)
{
FT_Glyph* ftGlyph = face.Glyph( n, FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP);
if( ftGlyph)
{
FTPolyGlyph* tempGlyph = new FTPolyGlyph( *ftGlyph);
glyphList->Add( tempGlyph);
}
else
{
err = face.Error();
}
}
return !err;
}