[osg-users] osgText: problem with SCREEN_COORDS mode

Robert Osfield robert.osfield at gmail.com
Thu May 17 10:04:05 PDT 2018

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 question whether
it's sensible to allow one to rotate text when in screen coords.

Once I have a breather from my present intense bit of client work I'll have
a deeper look.


On 17 May 2018 at 17:10, Glenn Waldron <gwaldron at gmail.com> wrote:

> 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 "rotate_matrix" and also removing the rotation
> component of "modelview". A quick test yields better results on my end.
> Thoughts?
> Glenn Waldron
> On Thu, May 17, 2018 at 11:55 AM Glenn Waldron <gwaldron at gmail.com> wrote:
>> 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]
>> Here is a minimal application to reproduce the problem:
>> https://pastebin.com/nuySbs8L
>> Run this and then use the mouse to slowly tilt the scene. The text
>> becomes stretched.
>> Glenn Waldron
> _______________________________________________
> 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/20180517/1dd705a1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2018-05-17_115339.jpg
Type: image/jpeg
Size: 20815 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180517/1dd705a1/attachment-0001.jpg>

More information about the osg-users mailing list