[osg-users] OpenSceneGraph-3.6.1 release candidate 3 tagged

Daniel Emminizer, Code 5773 dan.emminizer at nrl.navy.mil
Mon May 7 04:15:36 PDT 2018


Hi Robert,

Attached is an osgtext.cpp that demonstrates the problem I'm seeing in our application with text in SCREEN_COORDS scaling improperly.

In this particular app, we're using a FIXED projection matrix mapping (-1,-1) to the lower-left corner, and (+1,+1) to the upper-right corner (ortho 2D).  We have a layout system in this application that uses matrix transforms to position items in the layout.

In this section, the text is nested in two matrix transforms.  These transforms update values as a result of window resizes.  I omitted this code because it did not seem particularly relevant, and it is not required to reproduce the behavior.  I got the current values for both matrices by saving the scene to an .osg file and extracting the subgraph.

What you're seeing in this app is 4 text labels that form the text part of a 2D "compass", serving as a set of labels for a plot's X-axis.  Obviously this is just a subset of the whole scene.


When you resize the window with 3.6.1-rc2, you'll notice that the text skews significantly.  If you run the same app in OSG 3.4.1, the text looks correct regardless of window size.

Side discovery -- setting the backdrop had a weird impact on text placement.  Not entirely sure that I understand why.  It doesn't really impact us in our application, but I thought I'd mention it just in case it's important.

 - Dan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: osgtext.cpp
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180507/7a6278da/attachment.ksh>


More information about the osg-users mailing list