1
0
Fork 0
Commit graph

303 commits

Author SHA1 Message Date
Fernando García Liñán
f679764da2 Add a compile time flag to disable the default HUD
The default HUD still relies on legacy OpenGL features, which makes it
incompatible with the GL core profile. A replacement involving Canvas
has been discussed before, but for now a toggle switch is enough to test
the core profile.
2023-09-28 23:26:27 +02:00
James Turner
e10d827918 GUI: add non-PUI menu-bar backend 2023-09-12 21:33:57 +01:00
James Turner
9a4bfaed0f Clang: remove obsolete libc++ linkage flag 2023-02-20 09:52:55 +00:00
James Turner
dc467ebdfa Cmake Improve Finder for CppUnit
Define an imported target for the system CppUnit, so we can
correctly pass includes locations to FgfsTestSuite
2023-01-08 19:36:44 +00:00
James Hogan
199adf90df
VRManager: Update to osgXR 0.5.0
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>
2022-08-21 17:55:18 +01:00
James Hogan
b9efba55e7
src/Viewer/splash: VR splash screen
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.
2022-07-12 22:38:53 +01:00
James Turner
cbd5ef9e7b GUI: XML to Nasal bridge, to keep PUI dialogs working
(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.
2022-03-09 16:52:19 +00:00
James Turner
1114d836da Check Universal CRT version on Windows
Catch older versions of Ucrtbase.dll which can deadlock inside
setlocale() for us.
2022-01-20 20:37:44 +00:00
James Turner
e5e44d1c48 Silence a CMake warning
Explicitly use the legacy behaviour, until someone on Linux makes us
VND-compliant.
2022-01-18 16:42:25 +00:00
James Hogan
595c8a2fcb
CMake: Fallback to built-in osgXR library
Fall back to using the new built-in osgXR library in 3rdparty/ if no
system library is provided and OpenXR is available.
2022-01-13 18:01:00 +00:00
James Hogan
54699d46aa
CMakeLists.txt: Enable VR by default on WIN32
Now that osgXR has some semblance of windows support, enable VR by
default on Windows as well as Linux.

If osgXR isn't found it will be disabled.
2022-01-13 16:44:27 +00:00
James Hogan
f642c48da4
CMakeLists.txt: Improve finding of osgXR
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.
2022-01-13 16:44:27 +00:00
SDeAstis
493a9fa60d Modified Cmake and bootstrap to porperly support exclusion of Sentry.io 2021-11-18 16:20:08 +00:00
James Hogan
bad7047c36
VR: Visibility mask support
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.
2021-10-05 23:44:27 +01:00
James Hogan
dcdda1044a
VR: Find the osgXR library
Allow the osgXR[1] library to be found and linked against. We'll use
this to implement VR in FlightGear.

[1] https://github.com/amalon/osgXR
2021-09-02 22:29:09 +01:00
James Turner
b2ecf39749 Add the Sentry ingest key. 2021-07-28 13:49:01 +01:00
James Turner
695d41a1eb Raise minimum OSG version to 3.6 2021-05-24 16:47:32 +01:00
James Turner
026b02d7e9 CMake: make another object dependency explicit
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.
2021-03-10 10:17:15 +00:00
James Turner
4fe1fa04bc CMake: fix dependency on buildId target 2021-03-09 19:22:59 +00:00
James Turner
6e42c8fc57 Restore compatibility with CMake < 3.12 2021-03-09 12:02:57 +00:00
James Turner
33e205f123 Switch to using OBJECT library for main build
Allows sharing object files between the fgfs and test_suite targets, in
a follow-up commit.
2021-03-08 16:59:14 +00:00
Erik Hofman
af329b794f Use the find_dependency option to parse Simgear dependencies to FlightGear 2021-03-08 16:15:51 +01:00
Erik Hofman
ffc0105b47 Per request: Rename DDS to DataDistributionService to prevent confusion with DDS the image format. 2021-03-06 09:10:34 +01:00
Erik Hofman
5786d40272 * Support CycloneDDS as a SGIOChannel
* 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.
2021-03-05 16:10:04 +01:00
Scott Giese
3c694ddb5b Remove redundant policy definitions.
Add CMP0116 from CMake 3.20.
2021-02-20 22:34:32 -06:00
James Turner
67d235a17e Add a CMake message when ASan is enabled 2021-02-20 19:59:13 +00:00
James Turner
7b87b061da Add coherent noise filter to the AP 2020-12-26 18:54:35 +00:00
Scott Giese
1781bebb12 Easy rpath solution.
Supported for UNIX-like (excluding Apple, Cygwin).
2020-12-16 23:34:59 -06:00
Fernando García Liñán
255d193bc8 Make Compositor default
- 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.
2020-11-16 13:25:29 +01:00
Automatic Release Builder
2fe55d1e6b Sett RelWithDebInfo opt flags
Ensure we use O3 for AppImage builds
2020-10-29 14:47:33 +00:00
James Turner
740193a378 CMake: different fix for ALIAS issues with 3.10
ALIAS is not really functional in 3.10, so use a variable to approximate
the same behaviour. Not elegant but it seems to work.
2020-08-27 22:33:08 +01:00
James Turner
cf424e4344 Rename buildId header file
Avoid the very common name ‘build.h’ in favour of something clearer
and FlightGear specific.
2020-08-24 15:05:16 +01:00
James Turner
178d1beb80 Cmake: Remove version.h machinery
Merge this file into config.h, this means we can save an include path
everywhere.
2020-08-24 15:04:24 +01:00
James Turner
a82a13b70c Cmake: fix compat with CMake 3.10
Thankfully StackOverflow had an evil solution to this missing feature
in 3.10.
2020-08-23 22:25:03 +01:00
James Turner
fef50310bf Cmake: fix some issues Scott spotted. 2020-08-23 18:15:07 +01:00
James Turner
47ff3e9f67 Improve CMake strucutre 2020-08-23 11:31:37 +01:00
James Turner
5820619575 Move ENABLE_ASAN check to global scope
Allows ASan with GCC.
2020-08-23 11:30:21 +01:00
James Turner
d7504d8f65 Enable ASan for Clang 2020-08-17 10:21:26 +01:00
Julian Smith
d0aaf240f6 renamed version -> flightgear-version to avoid breaking clang++.
clang++ headers end up including <version>, which picked up this file instead
of the system one, breaking builds.
2020-07-04 09:02:51 +01:00
James Turner
94f98294de Workaround Fedora Qt packaging bug
Use a manual include file, instead of the official method, to check
if the Qt5 private headers are installed or not.
2020-06-24 16:36:45 +01:00
James Turner
8a35be7798 Flip the C++17 switch, experimentally. 2020-06-22 20:40:29 +01:00
James Turner
425a2f4fe3 C++ version fixes for C++17 support 2020-06-22 10:25:51 +01:00
James Turner
bd666f952e Raise minimum OSG version to 3.4.1 2020-06-18 17:39:48 +01:00
James Turner
306cc83744 Raise versions of CMake/Qt/Compiler/macOS
Let’s see what breaks :)
2020-06-18 12:58:09 +01:00
James Turner
9326c88f9b Move Qt root path variable to top-level CMakeList 2020-06-10 17:59:09 +01:00
James Turner
32ff21c1df UI: support OSG multi-threading modes, partially
Requires private header, so might need an additional package installed
on some Unixes.
2020-06-08 22:44:52 +01:00
James Turner
a9e5a27e55 UI handling tweaks
- add class to handle top-level windows
- remove requirement to use custom graphics-window
- order alongside PUI UI
2020-06-05 17:54:27 +01:00
James Turner
af00b5e304 Set CMake OpenGL VND policy 2020-06-05 13:33:27 +01:00
James Turner
f3db10d43b Fix missing guard in SIMD compiler flag setting 2020-05-28 10:47:29 +01:00
James Turner
bb6174bd44 Fix compilation with Boost >= 1.73 2020-05-28 10:47:10 +01:00