Changed the default texture size to 512x512 to reduce the number of textures

required when rendering text.
This commit is contained in:
Robert Osfield 2005-04-28 19:24:09 +00:00
parent 84aef32552
commit bf13c8ca14

View File

@ -86,8 +86,8 @@ Font::Font(FontImplementation* implementation):
_width(16),
_height(16),
_margin(2),
_textureWidthHint(256),
_textureHeightHint(256),
_textureWidthHint(512),
_textureHeightHint(512),
_minFilterHint(osg::Texture::LINEAR_MIPMAP_LINEAR),
_magFilterHint(osg::Texture::LINEAR)
{
@ -247,11 +247,11 @@ void Font::addGlyph(unsigned int width, unsigned int height, unsigned int charco
glyphTexture = new GlyphTexture;
//std::cout<<" Creating new GlyphTexture "<<glyphTexture<<"& StateSet "<<stateset<<std::endl;
osg::notify(osg::NOTICE)<<" Creating new GlyphTexture "<<glyphTexture<<"& StateSet "<<stateset<<std::endl;
static int numberOfTexturesAllocated = 0;
++numberOfTexturesAllocated;
//std::cout << " " << this<< " numberOfTexturesAllocated "<<numberOfTexturesAllocated<<std::endl;
osg::notify(osg::NOTICE) << " " << this<< " numberOfTexturesAllocated "<<numberOfTexturesAllocated<<std::endl;
// reserve enough space for the glyphs.
glyphTexture->setGlyphImageMargin(_margin);