osgXR 0.5.0 broke the API slightly, so update VRManager to use the new
enumeration names and update the required osgXR version for when using a
system version of osgXR.
Signed-off-by: James Hogan <james@albanarts.com>
Use a quad composition layer object from osgXR 0.3.9 to make the splash
screen VR friendly. This allows the OpenXR compositor to redraw the quad
without any updates from flightgear, which is particularly helpful as
flightgear makes no attempt at a reasonable VR frame rate during
initialisation.
The quad is positioned 2 meters from the user, with an aspect ratio
matching the desktop window. The quad is blended using an
unpremultiplied alpha channel which is forced to a given alpha value by
osgXR.
The splash is effectively already rendered to an FBO as non-linear SRGB,
so this is made explicit in the internal texture format, with the
rendering to the desktop window using GL_FRAMEBUFFER_SRGB to ensure it
is properly re-encoded.
(Disabled by a CMake option)
This builds equivalent C++ objects to what the PUI dialogs build, with
properties exposed to Nasal. Peer objects are created by Nasal callbacks,
which can implement the various dialog functions needed to keep
compatibility, especially the ‘update’ and ‘apply’ hooks.
Replace the ENABLE_OSGXR option with a slightly more user friendly
ENABLE_VR which is only enabled by default on Linux. If VR is enabled we
set ENABLE_OSGXR to enable the code, but only if a compatible osgXR
version is available. In any case a status message is output to specify
whether VR support is enabled or not.
This should allow VR support to be built even after osgXR couldn't be
found the first time cmake was run. The finding is now quiet so as not
to repeatedly spam the log.
Update osgXR to 0.3.3 which provides support for visibility masks using
the depth buffer, and extend VRManager to support them.
The following properties are added:
- /sim/vr/openxr/extensions/visibility-mask: This exposes whether
visibility masks are supported by the current OpenXR runtime, and
maps to osgXR::Manager::hasVisibilityMaskExtension().
- /sim/vr/visibility-mask: This allows visibility masks to be enabled
and disabled, and maps to osgXR::Settings::setVisibilityMask() via a
listener.
Finally we inform osgXR that it should use SimGear's newly defined
LEFT_BIT and RIGHT_BIT NodeMask bits for the visibility masks using
osgXR::Manager::setVisibilityMaskNodeMasks(). This allows a single
stereo camera to have a visibility mask for each eye.
Since we’re not using target_link_libraries, we need to explicitly
define fgfsObjects (which contains main.cxx) as depending on the
embedded resources target.
* Support the native fdm, gui and ctrl protocols over DDS
* Add fgfdm_log as an fdm over DDS command line logging utility
Usage:
--native-fdm=dds,out,60
--native-ctrls=dds,in,60
etc.
- Removed the ENABLE_COMPOSITOR CMake flag.
- Removed /sim/version/compositor-support.
- Removed miscellaneous branching to check if the Compositor is enabled.
- Removed custom resource loader since Compositor Effects are now located in $FG_ROOT/Effects.
- Removed splash screen warning.
- Only use the Compositor versions of CameraGroup and FGRenderer.
- Fix redout/blackout not appearing under certain circumstances.