1
0
Fork 0
flightgear/test_suite
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
..
attic TestSuite: Shifted the non-functional src/GUI/layout-test.cxx file to the attic. 2018-07-26 15:52:07 +02:00
fgdata_tests TestSuite: Added a testing category for FGData. 2019-09-13 11:55:09 +02:00
FGTestApi CompositeViewer: Support for multiple view windows using osgViewer::CompositeViewer. 2020-11-21 13:27:02 +00:00
gui_tests TestSuite: Initial support for a FlightGear test suite based on CppUnit. 2018-03-23 17:26:04 +01:00
simgear_tests Add another timer test 2020-08-07 11:39:07 +01:00
system_tests Rename test globals to testGlobals [.cxx|.hxx] 2019-09-24 11:39:34 +01:00
test_data Tests: change how we find+load data files 2020-05-24 14:14:35 +01:00
unit_tests Reposition: tolerate more scenarios in ATC_mgr 2020-10-27 18:32:18 +00:00
bootstrap.cxx Code changes for crash reporting with Sentry. 2020-04-17 17:55:34 +01:00
CMakeLists.txt CMake: overhaul how we find 3rd-party files 2020-08-26 13:57:24 +01:00
dataStore.cxx Cmake: Remove version.h machinery 2020-08-24 15:04:24 +01:00
dataStore.hxx TestSuite: FGData existence and version validation check prior to running tests. 2019-11-08 13:59:17 +01:00
fgCompilerOutputter.cxx TestSuite: Improved output formatting on MS Windows. 2019-09-26 12:34:25 +02:00
fgCompilerOutputter.hxx TestSuite: Addition of the --log-level option for setting the logging priority. 2019-09-20 19:36:48 +02:00
fgTestListener.cxx TestSuite: Renamed the 'verbose' command line option to 'timings'. 2019-09-20 19:42:57 +02:00
fgTestListener.hxx TestSuite: Renamed the 'verbose' command line option to 'timings'. 2019-09-20 19:42:57 +02:00
fgTestRunner.cxx TestSuite: Execution of multiple tests or suites using comma separated lists. 2020-08-17 20:14:32 +02:00
fgTestRunner.hxx TestSuite: Minor output formatting changes and disabling of the GUI tests. 2018-07-26 15:52:07 +02:00
formatting.cxx TestSuite: Minor output formatting changes and disabling of the GUI tests. 2018-07-26 15:52:07 +02:00
formatting.hxx TestSuite: Custom output formatting. 2018-03-23 17:26:04 +01:00
logging.cxx TestSuite: Fix include paths for logging 2020-09-08 11:37:13 +01:00
logging.hxx TestSuite: Fix include paths for logging 2020-09-08 11:37:13 +01:00
testSuite.cxx TestSuite: Fix include paths for logging 2020-09-08 11:37:13 +01:00