1
0
Fork 0
flightgear/src/Network
Julian Smith f62e5b9ce3 CompositeViewer: Support for multiple view windows using osgViewer::CompositeViewer.
Overview:

    Previously Flightgear always used a single osgViewer::Viewer(), which
    inherits from both osgViewer::ViewerBase and osgViewer::View, giving a
    single view window.

    If CompositeViewer is enabled, we instead use a osgViewer::CompositeViewer
    which contains a list of osgViewer::View's. Each of these View's can have
    its own eye position, so we can have multiple different views of the same
    scene.

    Enable at runtime with: --composite-viewer=1

Changes to allow use of osgViewer::CompositeViewer:

    Previously FGRenderer had this method:

        osgViewer::Viewer* getViewer();

    This has been replaced by these two new methods:

        osgViewer::ViewerBase* getViewerBase();
        osgViewer::View* getView();

    If CompositeViewer is not enabled (the default), the actual runtime state
    is unchanged, and getViewerBase() and getView() both return a pointer to
    the singleton osgViewer::Viewer() object.

    If CompositeViewer is enabled, getViewerBase() returns a pointer to a
    singleton osgViewer::CompositeViewer object, and getView() returns a
    pointer to the first osgViewer::View in the osgViewer::CompositeViewer's
    list.

    The other significant change to FGRenderer() is the new method:

        osg::FrameStamp* getFrameStamp()

    If CompositeViewer is not enabled, this simply returns
    getView()->getFrameStamp(). If CompositeViewer is enabled it returns
    getViewerBase()->getFrameStamp(). It is important that code that previously
    called getView()->getFrameStamp() is changed to use the new method, because
    when CompositeViewer is enabled individual osgViewer::View's appear to
    return an osg::FrameStamp with zero frame number).

    All code that uses FGRenderer has been patched up to use the new methods so
    that things work as before regardless of whether CompositeViewer is enabled
    or not.

    We make FGRenderer::update() call SviewUpdate() which updates any extra
    views.

Extra view windows:

    If CompositeViewer is enabled, one can create top-level extra view windows
    by calling SviewCreate(). See src/Viewer/sview.hxx for details.

    Each extra view window has its own simgear::compositor::Compositor
    instance.

    Currently SviewCreate() can create extra view windows that clone the
    current view, or view from one point to another (e.g. from one multiplayer
    aircraft to the user's aircradt) or keep two aircraft in view, one at a
    fixed distance in the foreground.

    SviewCreate() can be called from nasal via new nasal commands "view-clone",
    "view-last-pair", "view-last-pair-double" and "view-push". Associated
    changes to fgdata gives access to these via the View menu. The "view-push"
    command tags the current view for later use by "view-last-pair" and
    "view-last-pair-double".

    Extra view windows created by SviewCreate() use a new view system called
    Sview, which allows views to be constructed at runtime instead of being
    hard-coded in *-set.xml files. This is work in progress and views aren't
    all fully implemented. For example Pilot view gets things slightly wrong
    with large roll values, Tower View AGL is not implemented, and we don't
    implement damping. See top of src/Viewer/sview.cxx for an overview.

OpenSceneGraph-3.4 issues:

    OSG-3.4's event handling seems to be incorrect with CompositeViewer -
    events get sent for the wrong window which causes issues with resize and
    closing. It doesn't seem to be possible to work around this, so closing
    extra view windows can end up closing the main window for example.

    OSG-3.6 seems to fix the problems.

    We warn if CompositeViewer is enabled and OpenSceneGraph is 3.4.
2020-11-21 13:27:02 +00:00
..
HLA hla: Use hla derived classes part 2 2012-11-11 16:30:55 +01:00
http CompositeViewer: Support for multiple view windows using osgViewer::CompositeViewer. 2020-11-21 13:27:02 +00:00
Swift [swift] Fix coding style 2020-07-21 11:57:58 +01:00
ATC-Inputs.cxx [security] Prevent buffer overrun. 2019-06-15 21:30:54 -05:00
ATC-Inputs.hxx fix another crash on exit by finally converting the rest of unguarded 2006-06-11 10:21:10 +00:00
ATC-Main.cxx Further SGPath encoding fixes. 2016-07-01 04:54:29 -05:00
ATC-Main.hxx More unused vars caught by Xcode. 2013-07-04 20:56:04 +01:00
ATC-Outputs.cxx src/Network/: fixed gcc warnings and use snprintf. 2020-06-17 22:46:42 +01:00
ATC-Outputs.hxx More unused vars caught by Xcode. 2013-07-04 20:56:04 +01:00
atlas.cxx src/Network/: fixed gcc warnings and use snprintf. 2020-06-17 22:46:42 +01:00
atlas.hxx Remove static property dependencies 2012-11-18 16:35:54 +01:00
AV400.cxx Remove unused copy&pasted nmea code from other protocol's source. 2017-11-13 20:40:41 +01:00
AV400.hxx Initial work on FDM shell, and removal of cur_fdm_state 2010-06-26 10:31:22 +01:00
AV400Sim.cxx Some headers missing... ;) 2013-02-07 19:00:54 +01:00
AV400Sim.hxx Initial work on FDM shell, and removal of cur_fdm_state 2010-06-26 10:31:22 +01:00
AV400WSim.cxx More unused vars caught by Xcode. 2013-07-04 20:56:04 +01:00
AV400WSim.hxx Fix some warnings 2015-06-12 11:51:11 +02:00
CMakeLists.txt Swift: initial support 2019-04-11 11:36:22 +01:00
DNSClient.cxx Cmake: Remove version.h machinery 2020-08-24 15:04:24 +01:00
DNSClient.hxx SGSubsystem classes: Renaming of the subsystem ID variables and functions. 2019-07-01 14:27:30 +02:00
fgcom.cxx Improve CMake strucutre 2020-08-23 11:31:37 +01:00
fgcom.hxx FGCom: explicit init some member variables 2020-08-12 15:32:02 +01:00
flarm.cxx Rename buildId header file 2020-08-24 15:05:16 +01:00
flarm.hxx Adds support for NMEA messages for traffic reporting (flarm). Also extends the NMEA base class to handle bidirectional communication. Allows FlightGear to feed position and traffic data (for multi-player and AI aircraft) to NAV/moving-map clients, like xcsoar, skydemon, skymap etc. Some basic flarm configuration commands are also emulated, to properly persuade the clients. By default, all moving aircraft are reported (traffic information). Actual threat-alerts are also supported, but require the installation of the "TCAS instrument". 2017-11-24 22:54:32 +01:00
garmin.cxx Revised nmea and Garmin protocol classes. 2017-11-19 17:33:27 +01:00
garmin.hxx Revised nmea and Garmin protocol classes. 2017-11-19 17:33:27 +01:00
generic.cxx Improve a method name, as suggested by Florent 2020-07-03 12:34:37 +01:00
generic.hxx generic binary protocol: add 'word' datatype 2013-10-28 22:57:22 +01:00
HTTPClient.cxx Launcher: UI feedback for hangar migrations 2020-10-29 16:24:39 +00:00
HTTPClient.hxx Launcher: UI feedback for hangar migrations 2020-10-29 16:24:39 +00:00
igc.cxx Cmake: Remove version.h machinery 2020-08-24 15:04:24 +01:00
igc.hxx Add support for IGC logging protocol. 2013-10-14 22:13:31 +02:00
joyclient.cxx James Turner: 2008-07-29 08:27:48 +00:00
joyclient.hxx Fix warnings identified by updated XCode. 2013-06-21 18:39:24 +01:00
jsclient.cxx Remove current_aircraft global, fgAIRCRAFT struct, and dead code for reading aircraft dirs. 2010-07-01 22:33:51 +01:00
jsclient.hxx Fix warnings identified by updated XCode. 2013-06-21 18:39:24 +01:00
lfsglass.cxx Fix rpmlint/Linux packager complaints 2012-05-05 01:42:41 +02:00
lfsglass.hxx Fix warnings identified by updated XCode. 2013-06-21 18:39:24 +01:00
lfsglass_data.hxx Fix rpmlint/Linux packager complaints 2012-05-05 01:42:41 +02:00
native.cxx Fix native protocol crashes. 2013-07-18 12:01:36 +01:00
native.hxx Fix native protocol crashes. 2013-07-18 12:01:36 +01:00
native_ctrls.cxx Fixed erroreous reference to array instead of its element 2017-02-25 15:05:09 +01:00
native_ctrls.hxx Stop --native-ctrls option from breaking JSBSim 2013-12-15 21:32:40 +00:00
native_fdm.cxx Send fuel tank capacity, fuel density and level in m3 2020-07-29 20:13:07 +01:00
native_fdm.hxx Fix warnings identified by updated XCode. 2013-06-21 18:39:24 +01:00
native_gui.cxx Remove static property dependencies 2012-11-18 16:35:54 +01:00
native_gui.hxx Fix warnings identified by updated XCode. 2013-06-21 18:39:24 +01:00
net_ctrls.hxx Integrate a large part of John Wojnaroski's 747 cockpit project. 2006-01-20 17:19:01 +00:00
net_fdm.hxx Bump the protocol version because Chris Speck's changes broke the backward compatibility. 2020-10-02 21:30:54 +02:00
net_fdm_mini.hxx Use our own stdint.hxx implementation. 2005-09-22 11:47:58 +00:00
net_gui.hxx #513: netgui alignment mismatching on 32bit/64bit machines 2011-12-09 19:01:15 +01:00
nmea.cxx src/Network/: fixed gcc warnings and use snprintf. 2020-06-17 22:46:42 +01:00
nmea.hxx Adds support for NMEA messages for traffic reporting (flarm). Also extends the NMEA base class to handle bidirectional communication. Allows FlightGear to feed position and traffic data (for multi-player and AI aircraft) to NAV/moving-map clients, like xcsoar, skydemon, skymap etc. Some basic flarm configuration commands are also emulated, to properly persuade the clients. By default, all moving aircraft are reported (traffic information). Actual threat-alerts are also supported, but require the installation of the "TCAS instrument". 2017-11-24 22:54:32 +01:00
opengc.cxx Initial work on FDM shell, and removal of cur_fdm_state 2010-06-26 10:31:22 +01:00
opengc.hxx Initial work on FDM shell, and removal of cur_fdm_state 2010-06-26 10:31:22 +01:00
opengc_data.hxx new FSF address 2006-02-21 01:16:04 +00:00
props.cxx Fix a read of freed-data when closing props channels 2020-08-12 15:32:52 +01:00
props.hxx Telent protocol Nasal command 2018-02-11 21:15:45 +00:00
protocol.cxx implements reinit of IO channels 2020-08-10 10:27:51 +01:00
protocol.hxx implements reinit of IO channels 2020-08-10 10:27:51 +01:00
pve.cxx Initial work on FDM shell, and removal of cur_fdm_state 2010-06-26 10:31:22 +01:00
pve.hxx - remove the SG_GLxxxx_H #defines, since OSG provides its own versions 2008-07-27 16:25:13 +00:00
ray.cxx Ray protocol: don't use hardcoded gravity 9.81 2011-07-17 19:32:16 +02:00
ray.hxx - remove the SG_GLxxxx_H #defines, since OSG provides its own versions 2008-07-27 16:25:13 +00:00
RemoteXMLRequest.hxx ATC/Traffic doesn’t crash reset. 2015-12-11 12:11:59 -06:00
rul.cxx Initial work on FDM shell, and removal of cur_fdm_state 2010-06-26 10:31:22 +01:00
rul.hxx - remove the SG_GLxxxx_H #defines, since OSG provides its own versions 2008-07-27 16:25:13 +00:00