David Megginson wrote:
> I've just checked in a major revision to my new randomly-placed object
> code: it cuts down the memory usage a fair bit and eliminates long
> pauses when complex tiles fall out of the cache.  There are still some
> stutters at very high speeds (i.e. 3000kt), but at normal speeds, all
> seems smooth now.

Yep, it settles down at about 32 Mb free memory compared to about 39 Mb 
free memory without the dynamic objects. Good work!

> 
> The basic principle is that I add only a placeholder to the scene
> graph for the objects in each triangle.  When it falls into range, a
> callback creates the objects, and when it falls out of range, another
> callback frees them again.  That way, we have objects added only to
> triangles that are close to the plane, and there is no need to free
> hundreds or thousands of objects at once when a tile falls off the
> cache.
> 
> I also modified the material code so that an object and its texture
> are loaded only once, no matter how many materials use it.

Marvellous, I already wondered about this.

> 
> According to some quick tests, with randomly-placed objects disabled,
> FlightGear uses 214MB of which 79MB are RSS; with randomly-placed
> objects enabled, FlightGear uses about 237MB of which 102MB are RSS.
> That's a bit of a blow-up, but not nearly as bad as it was, and after
> a while the memory usage stops increasing and sometimes actually falls
> a bit.
> 
> Please everyone give this a brutal workout to find any further
> problems.  To enable randomly-placed objects, use
> 
>   fgfs --prop:/sim/rendering/dynamic-objects=true


Hmm framerates dropped fro 6~7 fps to 1~2 fps. I realy think the O2 
graphics options isn;t suitable enough for FlightGear anymore :-(
When I started FlightGear about 4(?) years ago I still had 18 fps ...

Anyway, fancy options are likely to drop framerates anyhow. Thankfully 
they can be disabled.

Erik




_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to