Commit Graph

5417 Commits

Author SHA1 Message Date
Richard Harrison
7354201b5d Added background (threaded) garbage collector 2019-05-13 15:21:08 +02:00
Scott Giese
14971f88ee [soundmgr_openal] Pause/Resume Sound.
The following changes fixes a case for me where I hear the sound change levels up and down for each pause un-pause cycle.
Patch provided by daniel.c.wickstrom@gmail.com.
2019-05-09 20:52:20 -05:00
Richard Harrison
0b114ac5cd SGTimeStamp elapsedUSec 2019-05-07 05:17:28 +02:00
Richard Harrison
c06eabff24 Instrumented Nasal GC 2019-05-07 05:17:27 +02:00
Richard Harrison
b3ef2478f5 Instrumented Nasal GC 2019-05-07 05:13:55 +02:00
Richard Harrison
39eb9837e9 Merge /u/fgarlin/simgear/ branch next into next
https://sourceforge.net/p/flightgear/simgear/merge-requests/55/
2019-05-05 13:50:27 +00:00
Scott Giese
1a429b63c5 [SGImageUtils] eliminate unused variable. 2019-05-04 15:45:53 -05:00
Scott Giese
ae6ad20940 [SGDemSession] fix uninitialized members. 2019-05-04 15:26:25 -05:00
Fernando García Liñán
3e57b50066 Added support for Effect schemes
Effect schemes are a way of rendering an object in different ways depending on the Compositor pipeline. A new <scheme> tag in the Compositor pipeline definition allows the user to choose which Effect scheme is going to be used for that pass. Every Effect will then be rendered using the technique that has a matching scheme name. If no valid technique is found, it won't be rendered. Since it would be a pain to define a valid technique for every scheme and for every Effect, the file '$FG_ROOT/Effects/schemes.xml' is introduced:

<scheme>
  <name>test</name>
  <fallback>Effects/test</fallback>
</scheme>

If an Effect doesn't have a valid technique for the 'test' scheme, the 'Effects/test.eff' Effect will be merged with it. This process is done at initialization when techniques are being realized.
2019-05-04 19:15:22 +02:00
Florent Rougon
dd38e399ca Add readwav.hxx to HEADERS and readwav.cxx to SOURCES in all cases
Previously, these two files were only added when SG was built with
-DUSE_AEONWAVE:BOOL=OFF, because the SG code in use when USE_AEONWAVE is
set to ON doesn't need readwav.hxx nor readwav.cxx. However, readwav.hxx
and readwav.cxx are not only used in SG, but also in FG (at least by
flightgear/src/Sound/VoiceSynthesizer.cxx), and this was causing a build
failure when SG's USE_AEONWAVE and FG's ENABLE_FLITE flags were both set
to ON:

  https://forum.flightgear.org/viewtopic.php?f=45&t=35672#p346633

and

  https://sourceforge.net/p/flightgear/mailman/message/36645567/

This commit should fix this build failure.
2019-04-27 11:23:14 +02:00
Florent Rougon
319b59500c Convert obsolete uses of get_filename_component(<var> <FileName> PATH)
In the context of get_filename_component(), PATH is a legacy alias for
DIRECTORY. Replace it with DIRECTORY, which is recommended[1] for
CMake versions > 2.8.11.

[1] https://cmake.org/cmake/help/latest/command/get_filename_component.html
2019-04-25 19:19:19 +02:00
Fernando García Liñán
3a79b71e80 Compositor: Effects used by a compositor now receive a proper SGReaderWriterOptions and other misc fixes 2019-04-23 03:35:10 +02:00
gallaert
0c0eab9247 Merge branch 'next' of https://git.code.sf.net/p/flightgear/simgear into next 2019-04-22 19:08:39 +01:00
James Turner
114ddcff52 Tweak code for older GCC 2019-04-11 21:39:41 +01:00
James Turner
57339486d9 Flip the default meaning of alternate-mouse-wheel-dir 2019-04-11 20:37:47 +01:00
Richard Harrison
5f9b17d55b Terrasync fixes;
- remove the old svn properties; a scan of FGAddon and FGdata showed these are not in use except for the dialog
- new property "active" - which is true when the worker thread is running.
- changes to enabled now take effect immediately; whereas before a reinit had to be issued. This could lead to confusing GUI state as the enabled property would be true but without closing the dialog (e.g. cancelling it) terrasync could be in a different state.
- use property nodes (performance optimisation)
2019-04-08 14:08:58 +02:00
Tim Moore
325b89e023 Fix automatic mipmap generation for Canvas textures
When using glTexStorage2D, OSG doesn't allocate storage for the levels
of the mipmap above the base unless an image is assigned to the
texture.
2019-04-04 12:07:34 +00:00
Tim Moore
9ebc823975 Optimize parsing of property node names
Add hand-coded versions of isalpha() and isdigit(), which were a
hotspot in profiling.
2019-04-04 12:00:18 +00:00
James Turner
5fdf6ef4f3 Simgear parts of queued command execution
Extend the command API to allow posting commands from arbitrary threads,
for deferred execution on the main thread. Additional pieces on the FG
side to follow shortly.
2019-03-24 14:13:42 +00:00
Richard Harrison
0792962591 add simgear::strutils::replace 2019-03-17 18:20:27 +01:00
Torsten Dreyer
f964374027 new version: 2019.2.0 2019-03-13 21:20:49 +01:00
Torsten Dreyer
4352c0a737 new version: 2019.1.1 2019-03-13 21:20:49 +01:00
Stuart Buchanan
a0bdcb30fd Correct log messages. 2019-03-12 21:53:22 +00:00
Stuart Buchanan
7e0a10c016 Set radius for PagedLOD
Speculative fix to address scenery chunks being unloaded
unexpectedly under high load.
2019-03-12 21:45:34 +00:00
Richard Harrison
7fb6f82ab1 Merge /u/fgarlin/simgear/ branch next into next
https://sourceforge.net/p/flightgear/simgear/merge-requests/49/
2019-03-07 15:21:35 +00:00
Scott Giese
fdcc9c9e0e Fix compile issue with OSG versions below 3.4 2019-03-05 23:56:47 -06:00
Richard Harrison
846f024e91 SGSubsytem name compatibility for other compilers;
changed to use const char* rather than const std::string & as this doesn't work on GCC; and besides std::string converts nicely to const char* and most of the times this is used it is actually a string literal.
2019-03-01 19:00:43 +01:00
James Turner
7e969f4e28 Updated star rendering phases/parameters
As part of this, adjust the normalisation so the active cutoff value
corresponds to 0.0 normalised intensity.
2019-02-25 16:12:41 +00:00
James Turner
10a701308d Make star cutoff controllable at runtime.
When a new property /environment/star-magnitude-cutoff is defined,
use this to set an upper bound on the magnitude of stars displayed.
2019-02-25 16:12:41 +00:00
Fernando García Liñán
e2bed86bfc Compositor: Enable small feature and view frustum culling by default for every pass. Added option to inherit the view master camera cull mask. 2019-02-23 23:26:27 +01:00
Richard Harrison
487cdc85cd DDS-TC; retain original filename and fix previous commit
Set the filename back to what it was after loading - seems sensible and as yet no side effects.

Also the previous commit that included the handling of sgio_exceptions also broke the DDS-TC pretty much completely.
2019-02-21 19:07:37 +01:00
Richard Harrison
052bbecc3b OSG 3.4.0 compilation fixes and anisotropy
Set anisotropy on model textures after loading.
2019-02-20 19:10:58 +01:00
Richard Harrison
c860b12b3d OSG 3.4.0 compilation fixes 2019-02-20 19:10:58 +01:00
Richard Harrison
e227008331 DDS-TC handle sgio_exceptions during hash creation.
ref: https://sourceforge.net/p/flightgear/codetickets/2113/
2019-02-20 19:10:58 +01:00
Fernando García Liñán
72f3a784de Compositor: Added support for static branching and <property> tags to be able to configure the Compositor at startup. 2019-02-20 03:05:55 +01:00
Richard Harrison
31c9df665d Fix compile error related to missing osg version include (< 3.6)
For some reason this compiles on 3.6.
2019-02-19 15:11:04 +01:00
Richard Harrison
dd240116b1 Compositor compilation fixes for OSG 3.6 and Win32 2019-02-19 08:59:54 +01:00
Richard Harrison
92ec139175 Merge /u/fgarlin/simgear/ branch next into next
https://sourceforge.net/p/flightgear/simgear/merge-requests/47/
2019-02-19 07:28:58 +00:00
Stuart Buchanan
f076c43b90 Improve parsing of state machines
State machines will now throw exceptions if errors are encountered
when loading the XML file.

This includes:
- Unknown <source> or <target> states referenced by transitions
- States and transitions without <name> elements
- Transitions without <target> or <condition> elements
- State machines with fewer than two states

Previously the state machine would load and then crash when hitting
such malformed states or transitions.  Now it will refuse to load,
while providing useful error messages as to the problem.
2019-02-14 22:15:38 +00:00
Stuart Buchanan
98215e3dbd Improve error messages for Nasal prop references. 2019-02-14 22:13:54 +00:00
James Turner
6197098541 Guard against a potential race init-ing libCurl 2019-02-13 12:49:21 +00:00
James Turner
34b3c52a28 Improve HTTP redirect handling, and add test.
Ensure we get the final status code for the request after redirecting.
2019-02-13 12:34:17 +00:00
Richard Harrison
caea68007e Fix subsystem tests 2019-02-11 08:49:40 +01:00
Richard Harrison
c1dd8faa29 Improved subsystem performance monitoring and overrun detection
This is to help diagnose where performance is being used and augments the current performance monitor.

The easiest way to active this is to open the performance monitor; however setting the enable property will enable less intrusive logging and overrun detection.

Using the GUI performance monitor itself affects the performance when it updates.

Properties

/sim/performance-monitor/enabled - need to be true to be active (unchanged)
/sim/performance-monitor/dump-stats - hierarchical dump to console of all current timing stats for all subsysems
/sim/performance-monitor/interval-s - reporting interval (unchanged)
/sim/performance-monitor/max-time-per-frame-ms - any subsystem that takes more than this amount of will be logged to the console
2019-02-10 17:48:21 +01:00
James Turner
95d065b3d7 Add strutils::iequals helper
Replaces another boost method
2019-02-06 12:35:08 +00:00
Scott Giese
2303da846b Fix missing header for OSG macros.
Patch provided by Stewart Andreason.
2019-02-05 21:46:02 -06:00
Scott Giese
7246edcb4b [boost::enable_if] Support Boost versions < 1.56 2019-02-05 12:20:06 -06:00
Fernando García Liñán
dc2f24dbed Compositor framework initial commit. 2019-02-04 18:02:44 +01:00
Scott Giese
4b793d5344 Remove deprecated boost/utility.
This is enable compatibility with boost 1.69.
2019-02-02 19:46:04 -06:00
gallaert
72dd45388f Merge branch 'next' of https://git.code.sf.net/p/flightgear/simgear into next 2019-02-01 12:34:40 +00:00