Fixes for optional compile of GL_LUMINANCE_ALPHA and GL_ALPHA texture usage

in fonts.  Default to GL_ALPHA.
This commit is contained in:
Robert Osfield
2003-12-09 12:04:14 +00:00
parent 4c3f6004df
commit bbde1b2ae7
4 changed files with 67 additions and 7 deletions

View File

@@ -80,9 +80,7 @@ osgText::Font::Glyph* FreeTypeFont::getGlyph(unsigned int charcode)
osg::ref_ptr<osgText::Font::Glyph> glyph = new osgText::Font::Glyph;
//#define USE_LUMINANCE_ALPHA
#ifdef USE_LUMINANCE_ALPHA
#ifdef OSG_FONT_USE_LUMINANCE_ALPHA
unsigned int dataSize = width*height*2;
unsigned char* data = new unsigned char[dataSize];
@@ -97,6 +95,8 @@ osgText::Font::Glyph* FreeTypeFont::getGlyph(unsigned int charcode)
osg::Image::USE_NEW_DELETE,
1);
glyph->setInternalTextureFormat(GL_LUMINANCE_ALPHA);
// skip the top margin
data += (margin*width)*2;