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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user