Updates osghud demo.

Compile fixes for VisualStudio6.0 because its a hideous pile of junk and can't
compile its way out of a paper bag.
This commit is contained in:
Robert Osfield
2003-03-03 22:18:33 +00:00
parent fcbf1e200a
commit e433b42bc0
6 changed files with 141 additions and 146 deletions

View File

@@ -225,7 +225,8 @@ void Text::computeGlyphRepresentation()
_textureGlyphQuadMap.clear();
osg::Vec2 cursor(0.0f,0.0f);
osg::Vec2 startOfLine(0.0f,0.0f);
osg::Vec2 cursor(startOfLine);
osg::Vec2 local(0.0f,0.0f);
unsigned int previous_charcode = 0;
@@ -243,6 +244,16 @@ void Text::computeGlyphRepresentation()
{
unsigned int charcode = *itr;
if (charcode=='\n')
{
if (horizontal) startOfLine.y() -= _fontHeight;
else startOfLine.x() += _fontWidth;
cursor = startOfLine;
previous_charcode = 0;
continue;
}
Font::Glyph* glyph = activefont->getGlyph(charcode);
if (glyph)
{