Canvas troubleshooting: Difference between revisions

Jump to navigation Jump to search
m
Line 463: Line 463:
osgviewer my-little-sg.osg
osgviewer my-little-sg.osg
</pre>
</pre>
As can be seen in the osgviewer screen shot, our osgText nodes are not properly transformed - i.e. the appearance doesn't quite match the original canvas in FlightGear. This is because we are directly dumping the corresponding osg::Nodes at the element level, without taking into account the top-level camera allocated by ODGaugage (our RTT/FBO helper) - to address this, we need to dump the top-level camera group instead, which also  contains the transformation matrix that is used by the lower level nodes:
<syntaxhighlight lang="diff">
</syntaxhighlight>
Using this helper function, we'll get a correctly transformed scene graph, matching the one originally created and shown inside FlightGear.


Once we inspect the scene graph, we'll see that it contains quite a bit of redundant state.
Once we inspect the scene graph, we'll see that it contains quite a bit of redundant state.

Navigation menu