Forced GLPixmapGlyph color to white rather than using glGetCurrentColor

This commit is contained in:
Don BURNS
2002-11-24 00:23:47 +00:00
parent 1098a7ded1
commit 89b2575ffe
3 changed files with 10 additions and 5 deletions

View File

@@ -42,13 +42,13 @@ void FTGLPixmapFont::render( const char* string,unsigned int renderContext)
{
glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT);
// Why is this modifying state here? - DB
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
FTFont::render( string,renderContext);
glPopAttrib();
}
@@ -56,6 +56,7 @@ void FTGLPixmapFont::render( const wchar_t* string,unsigned int renderContext)
{
glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT);
// Why is this modifying state here? - DB
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

View File

@@ -34,7 +34,7 @@ FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph)
}
numGreys = source->num_grays;
pos.x = bitmap->left;
pos.x = bitmap->left;
pos.y = srcHeight - bitmap->top;
// FIXME What about dest alignment?
@@ -44,8 +44,10 @@ FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph)
data = osgNew unsigned char[destWidth * destHeight * 4];
// Get the current glColor.
float ftglColour[4];
glGetFloatv( GL_CURRENT_COLOR, ftglColour);
float ftglColour[4] = { 1.0, 1.0, 1.0, 1.0 };
// What if the current color is black... Nah.
//glGetFloatv( GL_CURRENT_COLOR, ftglColour);
for(int y = 0; y < srcHeight; ++y)
{

View File

@@ -40,6 +40,8 @@ class FTGL_EXPORT FTPixmapGlyph : public FTGlyph
virtual float Render( const FT_Vector& pen);
// attributes
//
private:
/**