FlightGear Newsletter July 2020: Difference between revisions

Jump to navigation Jump to search
m
m (fix line break)
Line 29: Line 29:
== Development news ==
== Development news ==
<!-- News about FlightGear itself.  The FlightGear mailing list and/or core developers are a good source. -->
<!-- News about FlightGear itself.  The FlightGear mailing list and/or core developers are a good source. -->
=== Experimental CompositeViewer Support ===
{{Main article|CompositeViewer Support}}
[[File:Fg-cv.png|thumb|Julian just made some progress on CompositeViewer integration actually.He set things up so that one can 'clone' the current view using akey-press. This creates a new top-level view window with its own copyof the current view's camera projection matrix etc. The view is addedto the CompositeViewer so it sees the same scene.For now at least, cloned views' projection matrices don't change so thecloned views are completely independent from movement of the aircraft orchanges to the main view. Eventually he'd like to make them behave moredynamically, e.g. follow the aircraft if cloned from Helicopter View.At the moment most of the scenery doesn't show up and the backgroundcolours are wrong, but this screen shot shows it working]]
Julian Smith reported some  success by crudely changing flightgear's FGRenderer's osgViewer::Viewer to an osgViewer::CompositeViewer with a single osgViewer::View, and patching up all the calling code so it compiles.
It all builds ok, and he now got fgfs mostly working with CompositeViewer and the usual single View.<ref>https://sourceforge.net/p/flightgear/mailman/flightgear-devel/</ref>
CompositeViewer is not a build-time option any more. It is disabled by default, and enabled on startup with a new --composite-viewer=1 option.<ref>https://sourceforge.net/p/flightgear/mailman/message/37075130/</ref>
Julian made the use of CompositeViewer configurable at runtime, which might simplify getting involved in testing/further development - the same binary can now be used for normal use and for investigating CompositeViewer behaviour.
To execute the patched binary with the compositeviewer enabled, use: <code>fgfs  --composite-viewer=1</code> <ref>https://sourceforge.net/u/cgdae/flightgear/ci/059cf073c74d43a57c11f363cae6c9271772d869</ref>
Unfortunately the property system seemed to be not set up early enough to read in FGRenderer's constructor so we do a few calls of fgGetNode("/sim/composite_viewer", true)->getBoolValue() at runtime. Julian suspects they aren't called very frequently, in which case this branch (minus the diagnostics changes probably) might be ok to push to next at
some point, so that it's easier to test/investigate things.<ref>https://sourceforge.net/p/flightgear/mailman/message/37062319/</ref>
The previous problem with loading scenery was caused by code using the single View's getFrameStamp(), which appears to be never updated and always has _frameNumber=0. We need to use the CompositeViewer's getFrameStamp() instead.
For some reason buildings don't appear, but basic ground scenery now loads so fgfs progresses to loading the fdm etc and one can fly the aircraft as normal.


== New software tools and projects ==
== New software tools and projects ==

Navigation menu