Updates to the new osgtext example and fix to the friend usage.

This commit is contained in:
Robert Osfield
2003-03-04 17:14:42 +00:00
parent 55c25a551b
commit ba9fbd371f
4 changed files with 160 additions and 11 deletions

View File

@@ -215,7 +215,7 @@ void Font::GlyphTexture::addGlyph(Glyph* glyph, int posX, int posY)
// set up the details of where to place glyph's image in the texture.
glyph->setTexture(this);
glyph->setTexturePosition(posX,posY);
glyph->setMinTexCoord(osg::Vec2((float)posX/((float)getTextureWidth()-1.0f),(float)posY/((float)getTextureHeight()-1.0f)));
glyph->setMinTexCoord(osg::Vec2(((float)posX-1.0f)/((float)getTextureWidth()-1.0f),((float)posY-1)/((float)getTextureHeight()-1.0f)));
glyph->setMaxTexCoord(osg::Vec2((float)(posX+glyph->s())/((float)getTextureWidth()-1.0f),(float)(posY+glyph->t())/((float)getTextureHeight()-1.0f)));
}