From Vivek Rajan, "Rotated text in SCREEN_COORDS was looking a little squished especially

in orthographic projection. Performing the rotation before the scaling
fixed the problem. I've attached Text.cpp with the fix."

From Robert Osfield, in keeping with Vivek's change moved the auto rotate to screen befor the scale as well.
This commit is contained in:
Robert Osfield
2006-07-06 08:36:12 +00:00
parent d7f1c34df8
commit 2c2083db72

View File

@@ -764,6 +764,16 @@ void Text::computePositions(unsigned int contextID) const
atc._modelview.setTrans(trans);
}
if (!_rotation.zeroRotation() )
{
matrix.postMult(osg::Matrix::rotate(_rotation));
}
if (_autoRotateToScreen)
{
matrix.postMult(rotate_matrix);
}
if (_characterSizeMode!=OBJECT_COORDS)
{
@@ -822,16 +832,6 @@ void Text::computePositions(unsigned int contextID) const
}
if (_autoRotateToScreen)
{
matrix.postMult(rotate_matrix);
}
if (!_rotation.zeroRotation() )
{
matrix.postMult(osg::Matrix::rotate(_rotation));
}
matrix.postMult(osg::Matrix::translate(_position));
}
else if (!_rotation.zeroRotation())