[osg-users] osgText: problem with SCREEN_COORDS mode

Glenn Waldron gwaldron at gmail.com
Mon May 21 10:28:06 PDT 2018


Robert,
Thanks for looking into this. Your update works well.

I have one additional request: the computing of the origin, left, and up
vectors (lines 517-519) need to be done in double-precision. In my
graticule example, the text jitters as you manipulate the scene; changing
those lines to use osg::Vec3d resolves the issue. I have submitted a PR.

Glenn Waldron / osgEarth


On Sun, May 20, 2018 at 8:34 AM Robert Osfield <robert.osfield at gmail.com>
wrote:

> Hi Glenn,
>
> I have tried various ways to try and make the scale of the text
> consistent when using CharacterSizeMode is SCREEN_COORDS whle
> AxisAlignment is not SCREEN but in the end found the only solution
> that produces consistent results was to apply the same maths as was
> being use for the auto rotate case, except the auto-rotation itself is
> ignored when generating the final matrix.
>
> What I have checked in is:
>
> https://github.com/openscenegraph/OpenSceneGraph/commit/55c0afbe3ad2c6587f8c329a7dcc61284d8d18b9
>
> This is also checked into OSG master.
>
> To help test the various possibilities out I amend you test example to
> have --xy, --xz, --screen etc. command line options for setting how to
> set the axis alignment of the text.  This amended version is attached.
> With the above fix everything looks to be working fine, at least for
> the case of this test, the tests that other users have posted and
> osgtext.  Fingers crossed this means that osgText is now working
> solidly for 3.6.1.
>
> Cheers,
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180521/e9627478/attachment.html>


More information about the osg-users mailing list