]> git.mxchange.org Git - flightgear.git/commit
Initial stab at a threaded tile loader contributed by Bernie Bright.
authorcurt <curt>
Wed, 11 Apr 2001 02:47:15 +0000 (02:47 +0000)
committercurt <curt>
Wed, 11 Apr 2001 02:47:15 +0000 (02:47 +0000)
commitb0b6c342492868c465417b0fd71c8752e69a8fe5
treec3369ac673bfc729bcafb754fda20a9273163f08
parenta2049b110f44e28cba48b5d3d0adccd6df39a8ed
Initial stab at a threaded tile loader contributed by Bernie Bright.
He writes:

Here are the final changes to add threads to the tile loading.  All the
thread related code is in the new FGTileLoader class.

./configure.in
./acconfig.h
Added --with-threads option and corresponding ENABLE_THREADS
definition.  The default is no threads.

./src/Scenery/tilemgr
Removed load_queue and associated references.  This has been replaced by
a new class FGTileLoader in FGNewCache.
Made the global variable global_tile_cache a member.
schedule_needed(): removed global_tile_cache.exists() tests since
sched_tile() effectively repeats the test.
initialize_queue(): removed code that loads tiles since this is now
performed by FGTileLoader.
update(): ditto

./src/Scenery/newcache
Added new class FGTileLoader to manage tile queuing and loading.
tile_map typedefs are private.
exists() is a const member function.
fill_in(): deleted
load_tile(): added.

./src/Scenery/FGTileLoader
The new threaded tile loader.  Maintains a queue of tiles waiting to be
loaded and an array of one or more threads to load the tiles.  Currently
only a single thread is created.  The queue is guarded by a mutex to
synchronize access.  A condition variable signals the thread when the
queue is non-empty.

CLO: I made a few tweaks to address a couple issues, hopefully what we
have is solid, but now we kick it out to the general public to see. :-)
17 files changed:
acconfig.h
src/FDM/flight.hxx
src/Include/config.h.in
src/Main/Makefile.am
src/Main/main.cxx
src/Objects/matlib.cxx
src/Objects/newmat.cxx
src/Objects/newmat.hxx
src/Scenery/FGTileLoader.cxx [new file with mode: 0644]
src/Scenery/FGTileLoader.hxx [new file with mode: 0644]
src/Scenery/Makefile.am
src/Scenery/newcache.cxx
src/Scenery/newcache.hxx
src/Scenery/tileentry.cxx
src/Scenery/tileentry.hxx
src/Scenery/tilemgr.cxx
src/Scenery/tilemgr.hxx