Re: [osg-users] osgText: problem with SCREEN_COORDS mode

2018-05-21 Thread Robert Osfield
Thanks Glenn, PR merged with master and the 3.6 branch. On 21 May 2018 at 18:28, Glenn Waldron wrote: > 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

Re: [osg-users] osgText: problem with SCREEN_COORDS mode

2018-05-21 Thread Glenn Waldron
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

Re: [osg-users] osgText: problem with SCREEN_COORDS mode

2018-05-20 Thread Robert Osfield
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

Re: [osg-users] osgText: problem with SCREEN_COORDS mode

2018-05-19 Thread Robert Osfield
Hi Glenn, On 19 May 2018 at 12:11, Robert Osfield 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

Re: [osg-users] osgText: problem with SCREEN_COORDS mode

2018-05-18 Thread Robert Osfield
Hi Glenn, I have now looked at your test program and can reproduce the stretched text. The example is a bit unusual in that you have text size set to SCREEN_COORDS but the orientation of the text is free to move with the scene as it gets rotated by the viewer's camera, What I'd normally expect

Re: [osg-users] osgText: problem with SCREEN_COORDS mode

2018-05-17 Thread Robert Osfield
Hi Glenn, I haven't had a chance to look at your example yet, but at a guess I would suspect that the code trying to maintain the on screen aspect ratio of the text is struggling more and more as your rotate the text away from being orthogonal with the screen. If so then we need to ask the

Re: [osg-users] osgText: problem with SCREEN_COORDS mode

2018-05-17 Thread Glenn Waldron
Following up on my own post :) https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgText/TextBase.cpp#L520 I think that rotation matrices will result in an incorrect computation of the "left" and "up" vectors. So I think we need to use the translation and scale only by removing

[osg-users] osgText: problem with SCREEN_COORDS mode

2018-05-17 Thread Glenn Waldron
Robert, I am getting the following problem with the tip of the OpenSceneGraph-3.6 branch. (I am building under GL CORE profile on WIn64 but suspect that is not a factor.) This a simple osgText drawable in SCREEN_COORDS mode, tilted just a bit along the X axis: [image: 2018-05-17_115339.jpg]