Commit Graph

5748 Commits

Author SHA1 Message Date
Fernando García Liñán
b04cdbc491 Add a priority parameter to SGLight
In the future this will help choose which lights should be displayed if
the user sets the maximum number of lights to a low enough value.
2021-01-26 13:41:51 +01:00
Stuart Buchanan
3b1eb4a7f7 Remove Terrain simplifier - now redundant 2021-01-17 14:26:35 +00:00
Stuart Buchanan
b8ddf517f4 WS3.0 Add OBJECT STG entries as elevation constraints
Note this is for OBJECT only (e.g. airports), not
OBJECT_STATIC or OBJECT_SHARED
2021-01-14 11:32:07 +00:00
Stuart Buchanan
0a59de8c46 WS3.0: Add elevation constraints for airports
Previously if the elevation of the terrain vertices was higher
than the airport, the terrain pushed through the airport, looking
ugly.

This adds the concept of elevation constraint models, which the
VPBTechnique applies when generating terrain vertices.

Simply add a scenery model to the contraints on the technique,
and terrain won't poke through it.
2021-01-13 20:26:28 +00:00
Colin Geniet
d54e9b7675 Animations: Fix spin for Compositor lights
The 'spin' animation has a strange behaviour:
it pushes a temporary rotation matrix on the transformation stack during
cull traversal, and removes it thereafter.
Thus, the rotation matrix is missing outside of cull traversal, e.g.
when the position of Compositor lights is computed.

The same issue was fixed for the 'rotate' animation by commit
e202d4e4a5
(this mentions broken 'picking' animations as a different manifestation
of the same issue).

Fix this by setting the angle of the persistent SGRotateTransform,
instead of creating a temporary rotation matrix.
2021-01-13 12:18:22 +01:00
James Turner
0b9849d232 CMake: remove .cmake extensions
These seem to break include()’s regular path searching, which is odd.
2021-01-10 13:32:59 +00:00
James Turner
fa1f13cbe2 CMake: add upstream FindLibLZMA.cmake
Required since older CMake versions of this don't define an imported target
2021-01-10 11:56:22 +00:00
James Turner
d4a7cb1ee2 ArchiveExtractor .Xz compression of tar-balls
Allow use of LibZLMA / XZ compressed tarballs, which are significantly
smaller. Extend unit-tests to cover this.
2021-01-09 16:30:50 +00:00
James Turner
14494afd2f Tolerate blank lines in buildings lists 2021-01-08 19:39:37 +00:00
James Turner
9fbf56004b HTTPRepository: improving handling of archives
Avoid hard-coding the archive extension, and ensure the extracted
archive directory is not orphaned on update. Finally, use the
literal filename in the .dirindex when computing the hash, rather
than adding a .tgz extension.
2021-01-08 19:39:14 +00:00
James Turner
161f76508d TerraSync: allow separate OSM2City server
Lookup OSM2City using a separate service profile, and use this server
for requests for OSM2City suffix dirs.
2021-01-08 19:38:02 +00:00
James Turner
08906ebbb0 Launhcer: fix crashes adding a catalog
Traversing a container which is modified causes crashes, take a copy
during traversal for firePackageStatus.

Sentry-Id: FLIGHTGEAR-CJF
Sentry-Id: FLIGHTGEAR-CJ5
2021-01-01 15:34:17 +00:00
Fernando García Liñán
e606609a00 Remove unused Rembrandt stuff 2021-01-01 10:35:49 +01:00
Fernando García Liñán
5a2c348b12 Our cull visitor no longer collects light sources by default 2021-01-01 10:35:49 +01:00
Stuart Buchanan
b62808bb4c Fix hang on "Loading Scenery" over the sea
Previously attempting to start on an ocean tile with static
models present cause FG to spin on "Loading Scenery".

This was caused by not creating a BVH for an ocean tile in
the specific case where there was STG models, due to a PagedLOD
node being inserted in the scene graph.  So
FG never thought the scenery was loaded sufficient to place
the aircraft.

By explicitly creating a BVH for ocean tiles the problem is
fixed.

Candidate for 2020.X
2020-12-30 16:38:04 +00:00
Erik Hofman
62501e5ede Eatdirt: Implement parallax effects for the Moon at the rendering stage and not with the ephemeris. 2020-12-30 11:13:42 +01:00
Fernando García Liñán
60f5df2998 Make light animation definitions from Rembrandt compatible with SGLight
This effectively makes unmaintained aircraft with Rembrandt light definitions
automatically compatible with Compositor lights.
2020-12-30 09:28:29 +01:00
Fernando García Liñán
8f2e7824ab SGLight: Add support for dimming through a SGExpression ala Rembrandt 2020-12-30 09:27:30 +01:00
xDraconian
28015085ec Merge /p/flightgear-photoscenery/simgear/ branch next-photoscenery-r8 into next
https://sourceforge.net/p/flightgear/simgear/merge-requests/90/
2020-12-27 04:18:40 +00:00
Nathaniel MacArthur-Warner
1960a1b264 Get rid of duplicate log 2020-12-24 14:55:34 -08:00
Nathaniel MacArthur-Warner
7572d8f6ee Another logging improvement 2020-12-24 14:43:14 -08:00
Scott Giese
074cb31c28 fix: sky and cockpit to turn black
Metar sky condition without base layer height (e.g. FEW///) is the cause of this issue.
Randomize the base layer height when the actual height is unknown.
2020-12-24 15:39:39 -06:00
Nathaniel MacArthur-Warner
7dc8a86524 Warn when loading uncompressed DDS files since it causes problems on some systems 2020-12-24 12:26:30 -08:00
Nathaniel MacArthur-Warner
3fc6df203c Attempt to convert subimage on pixel format mismatch, provide more helpful logs 2020-12-23 23:39:39 -08:00
Nathaniel MacArthur-Warner
a56d1718de Check for and scale down oversize composite orthophotos 2020-12-23 22:38:03 -08:00
Nathaniel MacArthur-Warner
6ed37c880a When creating composite orthophoto, only scale sub images when necessary 2020-12-23 17:32:31 -08:00
Nathaniel MacArthur-Warner
0e7cf378a4 Indent fix 2020-12-23 14:07:34 -08:00
Nathaniel MacArthur-Warner
851ccb0ca7 Fix creation of composite orthophotos in case where aspect ratio of input photos doesn't match tile 2020-12-23 11:37:38 -08:00
Fernando García Liñán
0f482c14dd Do not let OSG cull lights away 2020-12-23 12:50:06 +01:00
Fernando García Liñán
a84133e945 (Another) significant rework of the clustered shading feature
This time it tries to be as compatible as possible with older hardware setups.
The only feature that might not be supported by some really old hardware
(or picky drivers) is floating point textures. There is no way around that
though, so this is as compatible as we can be with GL 2.1 level hardware.
2020-12-22 10:52:02 +01:00
Julian Smith
718a23cbbe Fixed build failure caused by flightgear now #including logdelta.hxx.
The fix is to add logdelta.hxx to list of headerss in
simgear/debug/CMakeLists.txt.
2020-12-22 00:35:40 +00:00
Julian Smith
687e65fa36 simgear/debug/logdelta.*: added logDeltaSet() to allow dynamic control. 2020-12-21 22:36:37 +00:00
James Turner
284667c18f Fix BTG error reporting
Use gzerror, not strerror, for these codes.
2020-12-21 13:26:04 +00:00
Fernando García Liñán
68caf780b0 Clustered Shading: Don't use static variables, use class member variables instead 2020-12-18 23:29:08 +01:00
Julian Smith
d1aa5a0b82 simgear/props/props.*: added method to add exising SGPropertyNode_ptr as child.
Avoids the need to create a new child and copy recursively.
2020-12-18 17:44:57 +00:00
Julian Smith
42c89ba6d3 simgear/props/props.cxx: parse_name(): improved exception text.
Also fixed indentation.
2020-12-18 17:44:57 +00:00
Fernando García Liñán
995608fc9e Fix wrong Compositor buffer formats 2020-12-18 01:45:26 +01:00
Scott Giese
e8f715c255 Maintenance: convert atoi to modern equivalence
Out of range results in undefined behavior in the C library.
Coverting to C++ library to avoid this risk.
2020-12-17 18:01:49 -06:00
Scott Giese
e031ea7f7c Crash prevention: throw during dtor
get_manager() will be called during dtor, so throwing an exception would cause a hard crash.
2020-12-17 17:02:40 -06:00
Scott Giese
9bac911fe1 Maintenance: Use empty instead of size==0 2020-12-17 16:08:06 -06:00
Scott Giese
cdd5cf8cd5 Remove unreachable code 2020-12-17 15:41:51 -06:00
Nathaniel Warner
3898ca5c09 Fix aiport signs appearing black when photoscenery enabled 2020-12-17 10:54:00 +00:00
Fernando García Liñán
5c21df742c Compositor no longer inherits from osg::Referenced 2020-12-17 06:35:55 +01:00
Scott Giese
39d616a0d5 Support Boost v1.75
Resolved a breaking change.
2020-12-15 01:41:32 -06:00
James Turner
b660061812 Fix Nasal GC errors on tests/reset
Ensure the Context temps are cleared, and when recycling an naCode,
ensure old values are cleared explicily.

Sentry-Id: FLIGHTGEAR-Y
2020-12-13 17:26:27 +00:00
James Turner
deda20d5bd SGGeod: add static constructor of an invalid Geod
Use this to allow explicitly initializing a value which isValid
will return false for.
2020-12-13 17:26:27 +00:00
xDraconian
b9c39fd2ab Merge /p/flightgear-photoscenery/simgear/ branch next-photoscenery-r6 into next
https://sourceforge.net/p/flightgear/simgear/merge-requests/88/
2020-12-12 23:13:37 +00:00
Nathaniel Warner
9e103fe7bf Prefer DDS over PNG for orthophoto 2020-12-12 13:59:52 -08:00
Nathaniel Warner
88be307540 Gracefully handle pixel format mismatch 2020-12-12 11:44:55 -08:00
Julian Smith
89fabafa15 simgear/props/props_io.*: added class for inline calling of writeProperties().
E.g. allows:

    SG_LOG(SG_VIEW, SG_ALERT, "returning:\n" << writePropertiesInline(config, true /*write_all*/));
2020-12-12 11:24:33 +00:00