Commit Graph

4852 Commits

Author SHA1 Message Date
Rebecca N. Palmer
8c38f799ad DrawElementsFacade: use ref_ptr instead of mismatched new/free
Found by AddressSanitizer; not seen to crash, but probably best fixed
2015-02-12 15:48:36 +00:00
James Turner
1bf0b7222d Explicitly force libc++ on clang 2015-02-11 15:46:01 +00:00
Stuart Buchanan
0cc5374fe7 Fix VASI/PAPI so they are generated. 2015-02-10 21:19:51 +00:00
James Turner
b2ac9982d4 Better CMake policy detection
- thanks to Rebecca Palmer for suggesting this!
2015-02-10 17:11:31 +00:00
James Turner
84cbfb2e98 Cmake policies conditional on Cmake version. 2015-02-09 16:42:40 +00:00
James Turner
7479cadbba Switch 10.7 on Mac and revert to using libc++
(Deployment on libstdc++ with the 10.9 SDK is just too painful)
2015-02-09 15:12:21 +00:00
James Turner
f711306085 Force SDK version / C++ library on Mac. 2015-02-08 13:46:09 +00:00
Peter Sadrozinski
148640be34 memory reduced tile loading.
- do not save the TileGeometryBin and matcach in the randomObjectCallback
- recreate matcache, and get TileGeometry from scenegraph
- split obj.cxx into three distinct files - loadBTG, load surface geometry, and load tile details
- includes fix for sceneries that have missing materials
2015-01-19 21:06:27 +01:00
Rebecca N. Palmer
27a91062bd Fix endianness tests, allowing arm64 support
https://buildd.debian.org/status/logs.php?pkg=simgear&ver=3.2.0~git20140719%2B4a9125-1&suite=experimental
https://launchpadlibrarian.net/183053167/buildlog_ubuntu-utopic-arm64.simgear_3.0.0-4_FAILEDTOBUILD.txt.gz
2015-01-18 21:53:22 +00:00
Rebecca N. Palmer
dc1816bb08 Fix UpdateOnceCallback crash (bug 1554/1556/1568) 2015-01-18 21:29:19 +00:00
Torsten Dreyer
e836e85697 Bump version to 3.5.0 2015-01-17 19:33:25 +01:00
FlightGear Flight Simulator
2d00653f6e Bump version number to 3.4.0 2015-01-17 19:26:46 +01:00
Stuart Buchanan
4647ce2da5 Protect against divide-by-zero error.
Patch from Emilian Huminiuc.
2015-01-15 21:47:22 +00:00
Stuart Buchanan
51d43f809e Fix directional lighting 2015-01-05 20:50:34 +00:00
Peter Sadrozinski
370a115ab9 - remove the test of the test.. 2014-12-27 13:19:29 -05:00
Peter Sadrozinski
32b60f9b80 - fix binobj unit test. Simgear now rejects zero area triangles in .btg files, and the unit test could generate them. 2014-12-27 13:08:53 -05:00
Peter Sadrozinski
beeaef3868 - fix for index overrun when building TexturedTriangleArray
- fix for ws2.0 zero area triangles - drop them when loading
2014-12-26 13:07:33 -05:00
James Turner
ddd9691439 Explicitly track not-found responses from SVN.
When SVN reports a path is not found (ocean tile), track
this data explicitly and cache the result. Reduces backend
hits for missing tiles.
2014-12-01 17:49:03 +00:00
Stuart Buchanan
9da0031039 Fix PagedLOD for random objects.
- Only generate the object set and flights from the data once.
- Only expire the PagedLOD node after a suitable period of time.
2014-11-28 21:57:37 +00:00
Thomas Geymayer
9537876bba Nasal: add an naRef to ghosts to allow for proper gc of dependent objects/ghosts.
This allows for binding the lifetime of any nasal object to
the lifetime of a ghost. Otherwise circular references from
objects saved within the ghost would prevent the ghost from
being garbage collected.
2014-11-23 23:45:22 +01:00
Stuart Buchanan
958ae9bdf0 Fix two bugs in random object placement 2014-11-21 22:14:03 +00:00
Torsten Dreyer
023b5a09f7 Make expiry time for paged models settable from props
Our paged models used the default minimumExpiryTime of zero seconds
which caused frequent stutter with AI traffic loaded.
This patch sets the minimumExpiryTime to 180 seconds, more than enough
to hold the models in memory during a full standard rate turn.

The property to set the expiry time is
/sim/rendering/plod-minimum-expiry-time-secs
2014-11-19 17:23:29 +01:00
Clément de l'Hamaide
46fe57fb8d UniformFactory: fix Rembrandt light 2014-11-16 20:22:29 +01:00
Stuart Buchanan
07e09bb88c Support alpha for cloud definitions Thorsten RENK 2014-11-13 20:38:28 +00:00
James Turner
1b7f310ea6 Merge FreeBSD patches.
Taken from:
http://svnweb.freebsd.org/ports/head/devel/simgear/files/
2014-11-11 22:29:24 +00:00
Stuart Buchanan
365ddb84a7 Limit number of random objects per triangle 2014-11-07 22:22:55 +00:00
Stuart Buchanan
5fef44b11c Change parameter name to avoid clash with cull-face 2014-10-27 22:40:27 +00:00
Stuart Buchanan
1480aa9bb8 Pass whether light is directional to shader.
Patch from Thorsten RENK.
2014-10-21 20:27:46 +01:00
Torsten Dreyer
75271c44a8 Precipitation updates from ThorstenR
Since the consensus seems to be that the precipitation clipping issue is with the panel code, attached is  my proposed update for the precipitation system in SG and FG

* without corresponding control structures in FGData it falls back to default, except I have fixed an inconsistency in freezing behavior - previously rain changed suddenly to snow when the temperature dropped below zero, but the reverse transition was dragged out and gave odd visible motion with the wind as snow gradually changed back to rain with the particle speed not well defined. Now both transitions are sudden. And I see no more particles flow against the wind

* with

 <!-- definitions for the detailed precipitation manager -->
 <precipitation-control>
     <rain-droplet-size type="float" userarchive="n">0.015</rain-droplet-size>
     <snow-flake-size type="float" userarchive="n">0.03</snow-flake-size>
     <detailed-precipitation type="bool" userarchive="n">false</detailed-precipitation>
     <illumination type="float" userarchive="n">1.0</illumination>
     <clip-distance type="float" userarchive="n">5.0</clip-distance>
  </precipitation-control>

added to Environment/environment.xml, the new system allows to switch more detailed management on. This provides

* explicit setting of rain droplet size and snow flake size by the weather system

* automatic sqrt(r) scaling of the vertical speed of raindrops

* automatic transition to snow when freezing for small droplets but hail for large droplet sizes (looks like snow, but has different particle dynamics)

* an illumination scaling factor to dim the precipitating based on the light we have in the scene (I still need to devise a property rule to set this automatically)

The clip distance is also exposed now and considered at startup of the system - might be useful for e.g. airships when the gas bag provides rain cover (?)   or to be simply off for open airplanes
2014-10-21 10:46:48 +02:00
Torsten Dreyer
543f1b7902 Set sun color below horizon
Thorsten Renk:
The following patch sets the sun color to alpha=0 when
the sun is below the local horizon, removing the oddity
that the sun is seen 'through' the terrain when the terrain
at large distance is rendered by the skydome.
2014-10-08 12:45:01 +02:00
Stuart Buchanan
93a63a0678 Further work to clean up UniformCache for Effects 2014-09-27 22:05:30 +01:00
Torsten Dreyer
2bf79a2fa1 Merge branch 'UniformFactory' into next
Merging in Stuart's fix for the Effect system
2014-09-27 21:50:44 +02:00
Torsten Dreyer
ab956f15c3 A better fix for crash in the Effect System
Stuart has improved the UniformCache approach, here are his
changes:
- We have a UniformCache so that each unique Uniform is only created once
- As part of the UniformFactory we also have a queue of listeners that are still to be added
- When the main thread sends an Update node visitor across the Effects,
  all queued listeners are de-queued and added.
2014-09-27 21:48:36 +02:00
Thomas Geymayer
deceee8997 Fix compiler warnings. 2014-09-22 18:24:13 +02:00
Thomas Geymayer
b3c7d63809 Let ENABLE_TESTS enable/disable also the new Boost.Tests. 2014-09-22 18:21:52 +02:00
Clément de l'Hamaide
2026c665b2 Improve the <usage> tag feature
Do not load the <model> if <usage> tag is found as child.
Instead the load is triggered later by FlightGear
2014-09-21 22:05:45 +02:00
Thomas Geymayer
36fd005bb9 cppbind: check if ghost is of wrong type.
- Throw an exception if converting an object
   from Nasal fails due to a wrong type (nil
   does not throw).
 - Update cppbind test cases accordingly (and
   refactor another test suite to use Boost.
   Test).
2014-09-15 23:42:12 +02:00
Torsten Dreyer
46bed67cce first stab at UniformFactory 2014-09-05 11:28:58 +02:00
Torsten Dreyer
5b9af0c0aa Revert "Partial fix for crash in SGPropertyNode::fireValueChanged"
This reverts commit f33ad357e9.
2014-09-05 11:28:28 +02:00
Thomas Geymayer
85090180d0 canvas::Text: fix global StateSet and line start cursor pos with empty line. 2014-08-31 19:24:58 +02:00
Torsten Dreyer
f33ad357e9 Partial fix for crash in SGPropertyNode::fireValueChanged
The effect system used Listeners on property nodes to get the values
for shader uniforms. These listeners get deleted by an osg thread
causing access to freed memory when this happens while the main thread
calls fireValueChanged.

This patch changes the update method to polling for scalar properties.
This isn't 100% threadsafe, too. But at least it does not crash anymore.
2014-08-29 15:30:25 +02:00
Clément de l'Hamaide
c30ce67e16 Remove Textures.high logic 2014-08-27 22:08:20 +02:00
Torsten Dreyer
3ca7369fb2 Canvas: add stroke-linejoin handling for path elements 2014-08-26 00:08:35 +02:00
Thomas Geymayer
088ce31f7c canvas::KeyboardEvent: C0/C1 control characters are not printable. 2014-08-25 21:49:44 +02:00
Thomas Geymayer
4f94c22241 Canvas: add method clearFocusElement. 2014-08-25 21:49:21 +02:00
Thomas Geymayer
e1791b3006 canvas::Text: clean up and expose character/cursor positions. 2014-08-23 15:54:07 +02:00
Stuart Buchanan
e608ed5a01 Use surface-lights effect for random tile lights. 2014-08-10 20:20:42 +01:00
Thomas Geymayer
35ebb16215 Canvas: prepare for keypress events. 2014-08-10 19:39:18 +02:00
Thomas Geymayer
68d0891665 Canvas: fix element mouse hit detection with OSG 3.3.2. 2014-08-10 15:37:43 +02:00
Stuart Buchanan
b11ff19a0f Fix VS2010 lack of fminf 2014-08-10 12:54:58 +01:00