I just committed some changes which restructure the way we free tile memory when we remove a tile from the tile cache.
The amount of time needed 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. When a tile is removed from the tile cache it's ssg elements are disconnected from the main ssg scene graph. This allows us to remove the ssg elements without affecting any other ssgCullAndDraw() operation. 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. To make all this work I have written a partial ssgBranch freeing routine. You specify a pointer to the branch and a number of allowed deletes for this call. The routine does a depth first traversal and frees leaf nodes until the 'delete budget' runs out. Then it returns. This has been something I've been wanting to impliment for some time now. :-) Regards, Curt. -- Curtis Olson IVLab / HumanFIRST Program FlightGear Project Twin Cities [EMAIL PROTECTED] [EMAIL PROTECTED] Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
