Commit Graph

5799 Commits

Author SHA1 Message Date
Julian Smith
d98d893f3e simgear/props/props.cxx: use rmutex to protect SGPropertyNodeListeners.
Also added asserts to check _num_iterators always >= 0.
2020-11-17 15:08:25 +00:00
Julian Smith
79e1ea02ab simgear/debug/logdelta.cxx: protect cache with a std::mutex. 2020-11-17 15:08:25 +00:00
Fernando García Liñán
a77551aa02 Only merge fallback effects if the Effect hasn't been realized yet 2020-11-17 15:21:49 +01:00
Fernando García Liñán
31170b11a0 Fix frustum parameters not being initialized 2020-11-17 13:08:30 +01:00
Fernando García Liñán
42ee05fd0e Check for 0 value before doing log2 2020-11-17 12:34:03 +01:00
Fernando García Liñán
79b858d6d8 Replace more references to GL_RGBA32F with GL_RGBA32F_ARB 2020-11-16 16:39:30 +01:00
Fernando García Liñán
6ae0dba659 Fix compilation issue on Mac and other graphics drivers 2020-11-16 16:19:27 +01:00
Fernando García Liñán
8f214fff7d Make Compositor default
- Remove prepending shader filenames with Compositor/.
- Always check for fallback effects in Effects/schemes.xml.
- Shadow mapping can now be disabled at night.
- New clustered shading implementation for older systems (GLSL 120 compatible).
- Miscellaneous bug fixes.
2020-11-16 13:21:51 +01:00
Erik Hofman
c9e23231da Keep the region name with the material. 2020-11-15 09:29:26 +01:00
Stuart Buchanan
94630733ff WS3.0: Pass tile_level, tile_width, tile_height
Create Uniforms for the tile_level, tile_width and tile_height.

These can be used by the fragment shader to determine the level
of detail to render and also to perform samples for borders of
landclasses.
2020-11-14 21:01:55 +00:00
James Turner
2fb20f793b Try to capture cause of BTG load failures 2020-11-12 09:37:04 +00:00
James Turner
f3847bd10f TerraSync: fix local-file copying
Avoid downloading data corresponding to files shipped in FGData.
2020-11-12 09:36:53 +00:00
James Turner
f8e4c2bae6 Untar: log error details when output create fails
Trying to understand why writing to the output files fails for some
users.

Sentry-Id: FLIGHTGEAR-SS
2020-11-12 09:36:49 +00:00
James Turner
bf69827990 TerraSync: make tarball extraction asynchronous 2020-11-12 09:36:43 +00:00
James Turner
ca857fcb25 Strutils: add printf format validation
Moved from NewGUI code in FG, better it lives here for re-use.
2020-11-10 23:49:25 +00:00
Stuart Buchanan
f72e093714 WS3.0: Replace OSG 3.6 methods with OSG 3.4 2020-11-10 16:20:25 +00:00
Stuart Buchanan
8d5428bf77 WS3.0: Initial commit to load and render WS3.0 2020-11-08 22:36:45 +00:00
Stuart Buchanan
cbd8e3acc4 WS3.0 : Initial technique to load and render WS3.0 scenery 2020-11-08 22:35:33 +00:00
James Turner
7f0a83388d DNSClient: own requests, and cancel them on timeout
Fixes crashes where a request times-out, but then is completed by
UDN sometime afterwards, with a free-d object. Have the DNS::Client own
requests, and be able to retrieve the udns_query to cancel them, in 
the timeout case.

Fixes a couple of Sentry reports.
2020-11-04 22:31:43 +00:00
Julian Smith
49484d5e86 simgear/debug/logdelta.cxx: don't use and/or keywords, appears to break on vc++? 2020-11-01 11:50:12 +00:00
Julian Smith
2a74cc9e5f Added logdelta system to allow control of log priorities based on source filename, line and function name.
See simgear/debug/logdelta.hxx for usage.
2020-10-31 23:58:57 +00:00
Julian Smith
365e5265c8 simgear/nasal/cppbind/test/cppbind_test_ghost.cxx: workaround for OpenBSD.
OpenBSD's clang++ can't cope with this code, so we disable it.
2020-10-31 23:52:23 +00:00
Julian Smith
cc699871a3 simgear/scene/model/SGReaderWriterXML.cxx: minor change to addTooltipAnimations().
Improved calculation of num_new_animations.
2020-10-31 23:52:23 +00:00
Julian Smith
510b25f8b8 Allow use of old zlib-1.2.3 on OpenBSD.
As of 2020-08-01, OpenBSD's system zlib is 1.2.3 which doesn't
have gzoffset(). However we can get away with this by making
gzfilebuf::approxOffset() always return zero.
2020-10-31 23:52:23 +00:00
James Turner
99bd9bb4c0 Terrasync: tarball extraction, use larger buffer
Use a 1MB buffer, 2kByte is very 1979 :)
2020-10-30 22:50:44 +00:00
James Turner
8d6d671cc1 TerraSync: switch to per-directory hash caching
Avoid a central hash cache becoming enormous, now we use the selective
download scheme for the tile dirs.

Hash name is changed to co-exist with older versions.
2020-10-30 22:49:53 +00:00
James Turner
990c53fc9c Fix Airports/ initial sync 2020-10-30 19:23:00 +00:00
James Turner
0dd046065d TerraSync: avoid 404s to probe missing tiles
Use the top-level dirIndex files to determine if a 1x1 tile dir
exists, instead of proving the server via a 404. This reduces the
number of requests we make considerably, which is … important.
2020-10-30 16:45:45 +00:00
James Turner
1ab1cae199 TerraSync: validate local dirs incrementally
Add a process() method to HTTPRepository, and use this to
incrementally validate subdirs after the .dirIndex is received. This 
avoids large pauses of the TerraSync thread, when all of Airports/
is validated at once.
2020-10-30 11:51:26 +00:00
James Turner
87558f8dde TerraSync: use an unordered_map for the hash cache
Linear-scan is a bit slow in debug builds, for the large Airports/ tree;
switch to an unordered_map.

Will back-port to the LTS once tested a bit more.
2020-10-29 23:13:10 +00:00
James Turner
e04249ba48 Props: allow flushing the atomic change listener
Trying to narrow down causes of the ‘unregister listeners crashes on
shutdown’ reports.
2020-10-29 17:26:38 +00:00
Automatic Release Builder
afcbf2ff3a Catalog migration: migrate packages too
When doing a catalog migration to a new ID (eg, 2018 -> 2020), also
mark the installed packages for installation, on the new catalog.

Related to this, when manually removing a catalog, record this fact,
so we don’t re-add it automatically due to migration.

Add unit-tests covering both of these cases.
2020-10-29 14:09:36 +00:00
Automatic Release Builder
d395a5c495 Sound: readWAV: avoid common exceptions.
Avoid exceptions for the common ‘file not found’ case, and instead
return false / nullptr. Erik says it’s fine.
2020-10-29 14:09:29 +00:00
Automatic Release Builder
29d4899f1f TerraSync: retry after socket failures
Assume socket failures are intermittent, up to some maximum count
(currently configured as 16). Add a test case to cover this.
2020-10-29 14:08:47 +00:00
Automatic Release Builder
baf95da93a TerraSync: Rate-limit hash-cache writes
This helps with IO-limited performance on Windows
2020-10-29 14:07:04 +00:00
Automatic Release Builder
dd6dfafabf SGPath: optimise exists() on Windows
For a very common existence only check, use a dedicated win32 API
function, to save some time.
2020-10-29 14:06:26 +00:00
Automatic Release Builder
439fa4c4a1 TerraSync: fix Windows behaviour
SGDir on Windows returns dot-files by default, which includes our
hash-cache, causing it to be orphaned.
2020-10-29 14:02:58 +00:00
Automatic Release Builder
b7308fa3ad Add a hasInstance to ResourceManager
This is needed to allow order-independent shutdown, due to the dumb
ownership behaviour for providers.
2020-10-29 14:02:50 +00:00
Automatic Release Builder
fba00d6894 SGFile::computeHash: check malloc result
Trying to fix a reported crash, in this code. malloc() returning null
seems unlikely but worth checking for. ALso use a unique_ptr with
a custom deleter to avoid a leak if we throw.

Sentry-Id: FLIGHTGEAR-3Y
2020-10-29 14:02:36 +00:00
Automatic Release Builder
77786e8e9b XMLSound: Avoid using exceptions for missing file
Reducing how noisy our exception reporting is, by using simple return
value from SGXMLSound::init.
2020-10-29 14:02:30 +00:00
Automatic Release Builder
a5dd5cdc80 TerraSync: fast start Airports/ sync
If TerraSync/Airports is missing, download Airport_archive.tgz instead.
In all other cases update as normal. This has the effect, that fresh
installs make many fewer requests to TerraSync servers.
2020-10-29 14:01:52 +00:00
Automatic Release Builder
ed357c5c8f Terrasync: re-add persistent update cache
Re-add (with some tweaks) the persistent tile-cache code, so that
TerraSync checks the server at most once per 24 hour period, for a
given repository path.

(Disbale the cache by setting /sim/terrasync/enable-persistent-cache=0)
2020-10-29 14:00:55 +00:00
Automatic Release Builder
6d892e8d18 Packages: fix circular refernece bug
Packages had a strong back-pointer to their catalog, creating a circular
reference loop. Break this so catalogs & packages are freed on exit.
2020-10-29 14:00:47 +00:00
Automatic Release Builder
ed8ff68114 Catalogs: fix enabling/disabling
Relates to bug Michael found in the launcher:
https://sourceforge.net/p/flightgear/codetickets/2380/
2020-10-29 14:00:40 +00:00
Automatic Release Builder
c0323e34a5 TerraSync: tweak warnings around checksum failures
Trying to reduce log spam when there is a server-side failure.
2020-10-29 14:00:22 +00:00
Automatic Release Builder
1ebb0787ad Fix level of terrasync start/stop messages 2020-10-29 14:00:12 +00:00
Automatic Release Builder
5e37c2092a Harden Repo::computeHashForPath
Check for some error cases in computeHashForPath, since this showed up
in some crash reports.
2020-10-29 14:00:01 +00:00
Automatic Release Builder
b3fc8deb5c Exceptions: optional callback for exception throws.
This is to allow recording an error+stacktrace whenever an exception
is thrown, since that’s the point when the stack is interesting.
2020-10-29 13:59:44 +00:00
James Turner
f489232cdb Fix for crash reported by Michael Danilov
In case uDNS returns a NULL txt pointer, don’t try to create a
std::string from it, since this will crash,

See: https://sourceforge.net/p/flightgear/codetickets/2398/
2020-10-25 18:59:37 +00:00
Scott Giese
f393a246ac METAR: When Wind unit not specified, default to knots.
FLIGHTGEAR-F6 resolved
2020-10-23 23:26:28 -05:00