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
Thomas Geymayer [Sun, 23 Nov 2014 22:39:56 +0000 (23:39 +0100)]
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.
Torsten Dreyer [Wed, 19 Nov 2014 16:23:29 +0000 (17:23 +0100)]
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
Torsten Dreyer [Tue, 21 Oct 2014 08:44:13 +0000 (10:44 +0200)]
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
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
Torsten Dreyer [Wed, 8 Oct 2014 10:45:01 +0000 (12:45 +0200)]
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.
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.
Thomas Geymayer [Mon, 15 Sep 2014 21:42:12 +0000 (23:42 +0200)]
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).
Torsten Dreyer [Fri, 29 Aug 2014 13:30:25 +0000 (15:30 +0200)]
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.
Thomas Geymayer [Sat, 19 Jul 2014 18:52:17 +0000 (20:52 +0200)]
canvas::Element: floating point scissor coordinates.
GL_SCISSOR itself only supports integer coordinates, but
with reference frames different from GLOBAL transforms
influence the position of the clipping frame, possibly
resulting in wrong positions due to too low precision.
Thomas Geymayer [Mon, 14 Jul 2014 16:51:11 +0000 (18:51 +0200)]
Nasal: require 0o as prefix for octal numbers.
Using just 0 as prefix for octal number can lead to confusion
where numbers could be interpreted the wrong way (oct instead of
dec).
Lets follow the same convention as Python 3 and Ecma 262 level 6
and use '0o' as prefix which can not be confused inadvertently.
Thomas Geymayer [Fri, 11 Jul 2014 17:07:53 +0000 (19:07 +0200)]
Don't restore old canvasses on reset.
No need for this anymore as PRESERVE now works as expected.
Otherwise old canvasses are restored and do not work anymore
as the placements of the new canvasses do not apply.
Thomas Geymayer [Mon, 30 Jun 2014 16:22:24 +0000 (18:22 +0200)]
HTTPRequest/pkg::Install: do not replace callbacks.
Keep a list of callbacks to allow registering multiple callbacks
to the same event. This is consistent with eg. jQuery.Deferred
and is needed for example to open multiple dialogs showing the
progress of installing a package at the same time.
Thomas Geymayer [Thu, 26 Jun 2014 07:44:36 +0000 (09:44 +0200)]
Nasal: fix parsing octal/hex numbers in strings as well as during lexing.
Parse the same number formats (octal, dec, hex) in literals and tokens. Was
previously quite a mess, and is still not the best solution, as lexing and
string parsing uses different implementations, although they are meant to
do exactly the same conversions.