[osg-users] osgText: problem with SCREEN_COORDS mode

Robert Osfield robert.osfield at gmail.com
Sat May 19 08:51:10 PDT 2018


Hi Glenn,

On 19 May 2018 at 12:11, Robert Osfield <robert.osfield at gmail.com> wrote:

> While I haven't got to the bottom of the change in behaviour, I am not
> sure that SCREEN_COORDS scaling is wholly appropriate for you usage case
>

I have been thinking so more and now wonder if we can check whether the
Text::CharacterSizeMode and AxisAlignment should be both checked for in the
TextBase::computeMatrix(osg::Matrix& matrix, osg::State* state) const
method and have different behaviour based on the different combinations.
The current implementation assumes that AxisAlignment is SCREEN when
CharacterSizeMode is SCREEN_COORDS, this is what I'd would normally expect
users to set up together as it there isn't an obvious mapping for when
AxisAlignment isn't SCREEN when CharacterSizeMode is SCREEN_COORDS.

I'm not sure what the most robust way to handle SCREEN_COORDS when
AxisAlignemtn isn't SCREEN, perhaps one could use AxisAlignment directions
so give up and side vectors that one could project onto the screen, or
combine both, or perhaps use the normal vector as well when trying to infer
what the scaling should be.

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180519/6afffd3d/attachment.html>


More information about the osg-users mailing list