1
0
Fork 0
Commit graph

15884 commits

Author SHA1 Message Date
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
0431e7cb3c
3rdparty: Import osgXR 0.3.7+
Import osgXR from https://github.com/amalon/osgXR master branch into
3rdparty, specifically commit b7e222775553b529018ac4b847353327c24ae5d4,
which is 0.3.7 with tweaks for building as a subproject in a
subdirectory.

This will allow VR support to be more conveniently built if not already
installed, without having to fetch yet another dependency.
2022-01-13 18:01:00 +00:00
James Hogan
31956f1f33
CMake: Handle osgXR includes implicitly
Recent CMake versions automatically add the include paths when
flightgear is linked against the osgXR::osgXR target, and code in
SetupFGFSLibraries.cmake handles older CMake versions. Therefore drop
the osgXR special handling in SetupFGFSIncludes.cmake and handle old
versions in SetupFGFSLibraries.cmake as done for the other libraries.
2022-01-13 18:00:44 +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
PlayeRom
cef5dc6544 Add anti-aliasing 8x in Launcher 2022-01-12 11:15:24 +00:00
Lars Toenning
bda359558c Update osg AI model LOD structure 2022-01-11 18:51:48 +00:00
portree_kid
b5dd4a8b6b ATC : Split out ATC Controllers 2022-01-10 20:45:10 +01:00
James Hogan
89b7f8139f
VRManager: Handle removal of prop getValue<const char *>()
Handle removal of SGPropertyNode::getValue<const char *>() in
VRManager::Listener<const char *>::valueChanged() by switching the
string listeners and VRManager setter handlers to std::string.

This fixes the following link error when VR is enabled:
ld: VRManager.cxx.o: in function `flightgear::VRManager::Listener<char const*>::valueChanged(SGPropertyNode*)':
src/Viewer/VRManager.hxx:147: undefined reference to `char const* SGPropertyNode::getValue<char const*>(std::enable_if<simgear::props::PropertyTraits<char const*>::Internal, void>::type*) const'
2022-01-08 22:47:59 +00:00
Julian Smith
cfe5ed0ef4 test_suite/unit_tests/AI/test_traffic.cxx: minor improvements to sprintf code.
Use snprintf() instead of sprintf() to avoid potential memory corruption.

Fixed sprintf time_t call - cast to long long.
2022-01-08 16:11:53 +00:00
Julian Smith
76dcb745e1 src/Aircraft/: fixed bug in recovery recordings.
If continuous compression is enabled, we used to compress recovery recording's
data, without setting continuous-compression to true in recording header, so it
would fail to load.

The fix is to compress recording data only if we are making a continuous
recording.
2022-01-08 16:11:53 +00:00
Julian Smith
311961a522 src/Viewer/: reduced some startup diagnostics. 2022-01-08 16:11:53 +00:00
Florent Rougon
b191f0a57d Use current "getstart" URL
Two affected places:
  - the built-in launcher (command line options link);
  - package/org.flightgear.FlightGear.metainfo.in.

The previous link points to an old version of the manual.
2022-01-08 14:09:01 +01:00
James Turner
179b751bf5 Unit-tests for Nasal range() 2022-01-07 16:16:01 +00:00
James Turner
d5bc2d4629 Map: make POI display optional 2022-01-07 11:16:19 +00:00
James Turner
33eb4a55fb Enable POIs on Windows, for testing
Jonathan Redpath reports that POI loading seems okay for him, let's enable
it on next and see who complains, and how loudly :)
2022-01-07 11:16:19 +00:00
James Turner
d135122408 Via: add a comment 2022-01-07 11:16:19 +00:00
Julian Smith
02bda6d8d2 src/MultiPlayer/multiplaymgr.cxx: avoid compiler warning for strncpy() call. 2022-01-06 22:17:05 +00:00
Julian Smith
3351a785be src/Viewer/viewmgr.cxx: enable/disable video encoding menu items.
It doesn't look like menubar items can be enabled/disabled using <property>
or <expression>, so instead we write to the File menu's items tree
/sim/menubar/default/menu[]/name[]/enabled.

We also set /sim/video/encoding-path to '' or path of video file that we are
encoding to.
2022-01-06 22:17:05 +00:00
Florent Rougon
e3b619dd05 Fix missing include in src/Scripting/NasalFlightPlan.cxx 2022-01-06 12:11:02 +01:00
James Turner
c1e5cc3074 Improve creating VIA segments
Improve argument parsing for createViaTo, createViaFromTo to
handle Airway ghosts as well as strings. As part of this, allow
specification of the airway level explicitly when looking
up an airway.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2686/
2022-01-05 15:44:50 +00:00
James Turner
a7ae3bf6cd Fix up linkage of Nasal tests inside CppUnit
Ensure correct test backend is used inside fgfs_test_suite
2022-01-05 15:41:33 +00:00
Jonathan Redpath
2b88a3c23f Level D 767 Parser - set approach type based on approach name 2022-01-05 12:05:01 +00:00
Jonathan Redpath
0bf618d7f1 Make geodFromHash accept geo.Coord with Cartesian coords.
geodFromHash() will now respect the _pdirty and _cdirty flags. This
ensres that FGPositioned functions are protected from invalid or
outdated coordinates, and therefore from erroneous results.
2022-01-04 12:08:14 +00:00
portree_kid
1043e6f7f5 Remove FGATCDialogNew 2021-12-28 20:26:39 +01:00
Julian Smith
1b7e8504ef test_suite/unit_tests/: cope with getStringValue() now returning std::string. 2021-12-27 10:19:34 +00:00
Erik Hofman
d813b9cdd9 keep a copy of the string returend by p->getStringValue() in setProp until it is sent to the DDS layer. 2021-12-27 09:04:20 +01:00
Scott Giese
44177b0362 runwayprefs: make argument const 2021-12-26 20:28:31 -06:00
Scott Giese
6657e35a52 Best practice 2021-12-26 20:18:00 -06:00
Scott Giese
e38fb0c440 GroundController: remove always false condition 2021-12-26 20:16:41 -06:00
Scott Giese
3e096fed41 ATISEncoder: remove always true condition 2021-12-26 20:09:20 -06:00
Scott Giese
17fde93fb2 AIGroundVehicle: remove always true condition 2021-12-26 19:45:33 -06:00
Scott Giese
4d10f37992 AIEscort: bug fix 2021-12-26 19:40:15 -06:00
Scott Giese
3c4220e784 AICarrier: clamp bug fix.
Since this code attempts to clamp values between 0.0 and 1.0, the comparision needs to occur using double types.
2021-12-26 19:32:44 -06:00
Scott Giese
f008531fd5 AIWingman Join bug fix
Also removal of redundant code (always true conditions).
2021-12-26 12:41:06 -06:00
Scott Giese
27b518e306 Best practice for pre/post incr/decr. 2021-12-26 12:39:22 -06:00
Scott Giese
3850700ce1 Undefined Behavior fix.
Shifting bits into the sign-bit is unpredictable.
Should be an unsigned type.
2021-12-26 12:38:08 -06:00
SDeAstis
560e7a3d12 Solved the problem with custom menu labels not properly displayed. 2021-12-26 12:51:37 +00:00
James Turner
7d2955347e Initialize a pointer to null. 2021-12-25 13:40:26 +00:00
James Turner
eb82084c53 Remove custom FindOpenAL.cmake
Adjust IAXClient OpenAL backend so we can use the standard CMake
finder for OpenAL (or OpenAL-soft).
2021-12-25 13:40:26 +00:00
James Turner
5b537a176e Adjust EnvironmentMgr API to avoid copying
getEnvironment encouraged pass-by-value of FGEnvironment
which is heavy and mostly unnecessary.
2021-12-25 13:40:25 +00:00
James Turner
a12a7e9bec Autopilot code tweaks
Move config.h include to correct place, and use
override instead of virtual in a few places.
2021-12-25 13:40:25 +00:00
Erik Hofman
6414df325d Cope with SGPropertyNode::getStringValue() now returning std::string by value. 2021-12-25 12:56:49 +01:00
Scott Giese
a993ff7ccb Revert "APT.DAT version 810 and 850 are both obsolete."
This reverts commit 913eb83e10.
2021-12-25 02:16:40 -06:00
Julian Smith
ee4d97097c src/Aircraft/continuous.cxx: reduced a diagnostic. 2021-12-24 14:49:06 +00:00
Roman Ludwicki
82f967ab92 Cope with SGPropertyNode::getStringValue() now returning std::string by value.
This is by Lars Toenning <dev@ltoenning.de>, Roman Ludwicki <romek21@op.pl> and
SDeAstis <salvatore.deastis@gmail.com>, in 2021 Hackathon.

Also cope with removal of SGPropertyNode::getName() - use getNameString()
instead.
2021-12-24 14:49:06 +00:00
James Turner
4bcfe6cd64 Follow SimGear OpenAL-soft behaviour
When Simgear is using OpenAL-soft, follow its behaviour for
IAXClient.
2021-12-24 13:27:25 +00:00
James Turner
93d278d63a ATC: use owning ref for AIAIrcraft
Avoid a crash where the raw pointers in AcitveRunway become
stale; use a real owning ref-ptr instead.
2021-12-24 13:06:10 +00:00
Florent Rougon
63df3351db Fix for --view-offset
Make --view-offset set /sim/view[0]/config/heading-offset-deg instead of
/sim/current-view/heading-offset-deg. Setting the latter has no effect
because of what flightgear::View::createFromProperties() does when it
initializes flightgear::View::View. This was discussed at [1].

[1] https://sourceforge.net/p/flightgear/mailman/message/37406317/
2021-12-24 08:58:49 +01:00
Scott Giese
913eb83e10 APT.DAT version 810 and 850 are both obsolete.
Remove 810 parsing.
Eliminate version strings from method names and messages.
2021-12-22 23:55:38 -06:00