Commit Graph

4293 Commits

Author SHA1 Message Date
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
Stuart Buchanan
e7e616e07c New materials.xml format 2014-08-09 20:34:08 +01:00
bcoconni
14f2f9e917 Added some OSG headers for the correct evaluation of the OSG_VERSION_LESS_THAN macro. 2014-08-09 19:53:19 +02:00
Thomas Geymayer
791273c61d Update for OpenSceneGraph 3.3.2 API changes. 2014-08-09 18:13:45 +02:00
Thomas Geymayer
519326f751 Add simple keyboard event demo application. 2014-08-08 00:59:06 +02:00
Thomas Geymayer
d1f5d92a7b Move canvas::AlignmentFlag to separate file.
Mapping in a separate file allows easier exposing of
values and string representation to Nasal.
2014-08-03 16:39:26 +02:00
Christian Schmitt
f448898531 Fix lights appearing three times.
The 3 lights showing up are fixed by my patch. It's the old way of
calculating a normal (PLIB-style) that makes them show up.
2014-08-03 13:13:59 +02:00
Thomas Geymayer
d9b66fc0ef canvas::Layout: support for alignment.
Set alignment inside layouts, taking care of where
excess space is distributed.
2014-08-03 12:02:39 +02:00
Thomas Geymayer
3bcd0bafd5 Lots of (mostly) doxygen fixes/cleanup. 2014-08-01 00:13:25 +02:00
Thomas Geymayer
942181c8ae Canvas: Support for preventDefault() on Events. 2014-07-30 17:16:26 +02:00