Commit Graph

5184 Commits

Author SHA1 Message Date
Richard Harrison
8e57a61aed Fix null ref during load.
This happened a few times
2019-01-20 18:28:37 +01:00
Richard Harrison
8707005a97 Fix particles active even when disabled during load.
Possibly this could be fixed better by using the plugin string data - but there is nothing that currently set this; and it seems easier to use the particle callback enabled flag.
2019-01-20 18:28:37 +01:00
Richard Harrison
cb024dd82d Fix for deleting still referenced object
ref https://sourceforge.net/p/flightgear/codetickets/2105/

Use the thread safe versions (getRef) of the objectcache methods
2019-01-20 18:28:37 +01:00
Richard Harrison
84046a6717 Add missing method 2019-01-20 18:28:37 +01:00
Richard Harrison
8bcaa50ba6 OSG3.7 changes 2019-01-20 18:28:37 +01:00
Richard Harrison
c433d29171 Win32: use high resolution timers (QueryPerformanceCounter) if available 2019-01-20 18:28:36 +01:00
Richard Harrison
64d51b5290 sg_file: Add compute hash method 2019-01-20 18:28:36 +01:00
Erik Hofman
6393b7704e Do not attempt to deregister the same emitter more than once 2019-01-16 14:55:37 +01:00
Erik Hofman
0a2071b2f1 Use AAX_PROCESSED since AAX_STOPPED is only a request to stop but the library decides when it is actually stopped. And AeonWave has become more picky about destroying emitters which aren't completely processed yet since MIDI support was added. 2019-01-15 11:38:38 +01:00
Erik Hofman
7981809f36 Split up SIMD support in ENABLE_SIMD which enables sse2 support for the compiler and ENABLE_SIMD_CODE which enables the hand crafted SIMD math functions which defaults to OFF now since compilers have catched up on generating optimized vectorized SIMD code. 2019-01-15 10:36:23 +01:00
Scott Giese
ed87a0b032 Eliminate compiler warnings 2018-12-23 22:16:05 -06:00
James Turner
fc2630e66d Revert "Logging API changes"
This is causing perf impact, so reverting until we figure out
a lower-impact solution.

This reverts commit 1be3e5771a.
2018-12-23 09:17:15 +00:00
Stuart Buchanan
ec14050890 General tiles with only BUILDING_LIST
Bug found during code-read.  If tile just contained BUILDING_LIST
entries (i.e. no OBJECT_STATIC or OBJECT_SIGN entries), then it would
not generate.
2018-12-22 16:52:05 +00:00
James Turner
4b17ea95fc Random buildings: reduce log output in a common case 2018-12-20 16:10:36 +00:00
James Turner
1be3e5771a Logging API changes
Remove would_log() : callbacks receive all log messages so they can
do custom filtering individually.

Also move popup message handling into the private (d-ptr) of sglog(),
to keep the header as minimal impossible (no include of <vector>)
2018-12-20 16:10:36 +00:00
Stuart Buchanan
232cbbac5e DEBUG logging of model animation counts. 2018-12-19 20:05:06 +00:00
Stuart Buchanan
b71e9eac51 Fix 2092 DDS cache: segmentation fault when reloading scenery.
https://sourceforge.net/p/flightgear/codetickets/2092/

DDS cache: segmentation fault when reloading scenery.
2018-12-10 21:21:44 +00:00
Edward d'Auvergne
8a301efe8b PropertyObject: create() function support for SGPropertyNode_ptr. 2018-12-04 12:38:14 +01:00
Edward d'Auvergne
5bd393135f PropertyObject: Unit test for declaration followed by definition. 2018-12-04 12:38:14 +01:00
Edward d'Auvergne
d550eac525 PropertyObject<std::string>: Added a default ctor. 2018-12-04 12:38:14 +01:00
Edward d'Auvergne
fea59adbbe PropertyObject: Unit test for declarations.
This shows a failure for the declaration of std::string type PropertyObjects.
2018-12-04 12:38:14 +01:00
Richard Harrison
dae0d0ff8b Logging changes.
1. Anything that comes in from OSG will always be logged; it seems
somewhat redundant to have to set the FG log level to be identical to
the OSG log level to see these messages.

2. Console output will now have delta time (since start), priority and class.

3. Log file output wil also have delta time (since start), priority and class.

Times are displayed as delta decimal seconds since the logger was created

e.g.
  1294.06 [INFO]:terrain    Some log message
2018-11-29 19:29:14 +01:00
Richard Harrison
86d739cc85 DDS TextureCache: remove unused code to support non-persistent images
- this didn't compile for Stuart on OSG3.2 and it's not used.
2018-11-25 23:48:58 +01:00
Richard Harrison
9d99f4ce30 Added DDS Texture Cache.
This is a performance improvement that reduces the amount of frame pauses which are related to mipmap creation when the geometry (osg::Texture) is added to the scene graph within osg::Texture::applyTexImage2D_load

The texture cache is configured from FG as follows
- /sim/rendering/texture-cache/cache-enabled
- /sim/rendering/texture-cache/compress-transparent
- /sim/rendering/texture-cache/compress-solid
- /sim/rendering/texture-cache/compress

These properties are set via the SGSceneFeatures singleton.

When the texture cache is enabled it will auto convert files from any supported osg::Image format that can be read and store the resulting (compressed or raw) file in the texture cache.

The texture cache uses osg_nvtt to perform texture compression (and mipmap generation) if available. When not available simgear::effect::computeMipmap is used to make mimaps but compression isn't available.

The texture cache filename ends with .TIME.cache.dds where TIME is the hex modtime of the original file. As yet there isn't a clean way to maintain the texture cache to ensure that stale files are removed; and in fact this is quite difficult to do because of the dynamic nature of the cache.

The texture cache will be stored in download_dir/texture-cache unless --texture-cache is passed on the command line.

The UI has a single checkbox to turn the texture cache on or off.
2018-11-24 20:02:33 +01:00
Stuart Buchanan
460a666234 STG-defined buildings using Random Building shader
Support BUILDING_LIST STG verb which references a file
containing the cartesian coordinates of individual buildings,
to be generated using the random-building shader approach.

BUILDING_LIST buildings.txt OSM_Building -2.72943543 56.00080606 36.1 0

buildings.txt:

0 0 0 0 0
0 100 0 0 0
0 200 0 0 0
0 300 0 0 1
0 400 0 0 1
0 500 0 0 2
100 0 0 0 2
200 0 0 0 2
300 0 0 0 2
400 0 0 15 2
2018-11-18 21:08:06 +00:00
Stuart Buchanan
ba9342cd4b Fix effects for MP models - ticket 2076
https://sourceforge.net/p/flightgear/codetickets/2076/

Effects were being instantiated by the loader for
all models, rather than just simple .ac/.obj models.
2018-11-06 17:01:01 +00:00
Richard Harrison
61cc8d6c50 Fix exception when number of primitive sets not what assumed.
This was something that happened when random vegetation was off, but tree shadows was on.

Adding random vegetation would then reliably cause an exception.
2018-10-30 20:13:32 +01:00
Richard Harrison
758ab5e581 LOD ranges
The scenery ranges for bare and rough are now deltas, to avoid overlapping values by user error.
2018-10-30 20:12:12 +01:00
James Turner
f05ff37560 Fix for assert with empty systems
Empty subsystem groups didn’t set their init state correctly, leading
to an assert on post-init. Fix this and add a test for it.

https://sourceforge.net/p/flightgear/codetickets/2043/
2018-10-23 15:29:56 +01:00
Stuart Buchanan
14354090f9 Don't check for cloud movement every frame
Under Basic Weather, the cloudfield is finite size and clouds
are shifted as the viewpoint changes.  Previously each cloud
was checked every frame to determine if it should be shifted.
Not this only occurs if the viewpoint has moved a non-trivial
distance.

Note that this is separate from the clouds moving due to the wind.
2018-10-18 22:28:39 +01:00
James Turner
0185884ca8 Catalogs: allow migration to alternate IDs 2018-10-16 09:56:56 +01:00
James Turner
46b271d75c Packages: improve localised string support 2018-10-12 10:49:14 +01:00
James Turner
854b958797 Packages: check for existing update when scheduling
This is fixing an issue identified in the launcher in a secondary way,
to ensure if another user of the API tries to schedule an already
scheduled package, we ignore the second request.
2018-10-05 10:40:35 +01:00
James Turner
ff52b55a25 Mac: Set CMake OS-X deployment target correctly
Also raises the OS-X min version to 10.9 for libc++ compat
2018-10-01 22:28:56 +01:00
Scott Giese
69e20a3931 Bug Fix #1922 Wrong retun type 2018-09-29 18:41:00 -05:00
James Turner
05da3db2ed Fix a debug message left in the terrasync code 2018-09-24 14:54:20 +01:00
Torsten Dreyer
6d89cc6c1d new version: 2018.4.0 2018-09-21 17:18:46 +02:00
Torsten Dreyer
0494af48a3 new version: 2018.3.1 2018-09-21 17:18:46 +02:00
James Turner
f4cad42958 Lat-lon parsing: catch exceptions from std::stod
The standard library throws exceptions in some cases, catch those
and return false. Extend the test coverage for some of the problematic
cases.
2018-09-13 23:47:24 +02:00
James Turner
32189b7239 Event-manager: add dump() method for debugging 2018-09-01 18:08:32 +01:00
James Turner
c192071f03 TerraSync: improve copy-installed-files logic 2018-08-31 16:05:48 +01:00
James Turner
8c9fda9137 Fix Utf-8 literal on MSVC 2018-08-31 16:05:48 +01:00
James Turner
8dd0833993 Fix setting OPENAL_DIR on Windows
We need to set this in all cases, since AeonWave is requested by
default, but may not be available.
2018-08-23 19:11:50 +01:00
James Turner
306eaeaba9 Fix subsystem-remove bug 2018-08-19 12:32:30 +01:00
James Turner
7853a5329d Extend propsfwd.hxx so it can be used in more places 2018-08-11 18:41:29 +02:00
James Turner
1fa77078fc Subsystems: bind/init/unbind on add/remove
When adding/remove subsystems to a group which is already bound or
inited, transition the subsystem automatically. This removes the
need to manually transition the subsystem in various places in
Flightgear.
2018-08-11 18:41:04 +02:00
James Turner
8e8ce04e18 Subsystems: default name to group name when adding 2018-08-11 18:16:33 +02:00
James Turner
264779e1d3 Packages: fix download progress
(Broke it when improving zip/tar support)
2018-08-08 11:12:53 +02:00
James Turner
6f505f3a76 formatGeodAsString: add ICAO route format 2018-07-30 10:08:34 +02:00
Edward d'Auvergne
3817bdd602 NotifyLogger: Shifted the class from flightgear to simgear.
This is to allow the code to be reused in the flightgear test suite.
2018-07-26 20:48:12 +02:00