]> git.mxchange.org Git - flightgear.git/commit
Restructure the way tile freeing is handled. When a tile is removed from
authorcurt <curt>
Thu, 25 Jul 2002 23:59:04 +0000 (23:59 +0000)
committercurt <curt>
Thu, 25 Jul 2002 23:59:04 +0000 (23:59 +0000)
commit27158525a9fbcd433b4cc166d7715c91fc9a5d36
tree99b05afcf1d8bbc216d1a2c04184fbff302e9c7e
parent96d499f4f15ebd5c94b5a59d3f536e4202bba1e0
Restructure the way tile freeing is handled.  When a tile is removed from
the tile cache it's ssg elements are disconnected from the main ssg scene
graph, and then the tile is thrown on the end of a delete queue.  The
tilemgr->update() routine runs every frame.  It looks at this queue and if
it is non-empty, it incrementally frees the compents of the first tile
on the queue.  When the tile is completely free it is removed from the queue.

The amount of time to free the memory for even a single tile can be quite
substantial, especially with the increased overhead of dynamic/random
ground objects.  This change allows the system to spread the work of freeing
tile memory out over many frames so you don't get a noticable single frame
hit or stutter.
src/Scenery/tileentry.cxx
src/Scenery/tileentry.hxx
src/Scenery/tilemgr.cxx