1
0
Fork 0
Commit graph

59 commits

Author SHA1 Message Date
curt
d5a2533411 Fixed a bug in the tile pager / caching / management system that caused
a crash when relocating to a new airport.  Pending work from the old
area is now just completed as normal, rather than trying to empty the various
queues in their various stages when can lead to many problems in a threaded
environment.
2001-05-30 18:21:03 +00:00
curt
29d540901c Tile pager tweaks.
MSVC++ tweaks.
2001-05-21 20:44:59 +00:00
curt
34854ab2af Threaded tile paging:
- model loading deferred to primary thread
- tile removal deferred to paging thread
- other tweaks and rearrangments.

Airport signs
- first stab at some support for adding taxiway and runway signs.  This
  is non-optimal, but I'm under the gun for a demo.
2001-05-19 16:59:43 +00:00
curt
865fb56c5a Tile loading is interleaved now when not threaded. Threaded loader is
throttled to one tile per frame maximum.
2001-05-18 20:31:23 +00:00
curt
4a609646b6 Modified FlightGear/src/Scenery. The tile loader thread no longer adds
a newly loaded tile to the scene graph.  Instead it puts it in a queue
for the tile manager.  I've used your counter_hack to check the loaded
queue and add any tiles to the scene graph.  I was playing around with
the counter_hack so there might be some commented out code, etc.  I also
changed some SG_DEBUGs to SG_INFOs so I could track the tile loading.
2001-04-16 20:03:52 +00:00
curt
a29cb28e93 Tweaks to the tile pager so it waits for a signal from the main thread before
loading the next tile.  This allows the main thread to "pace" the tile loader
so it consumes fewer resources.
2001-04-14 03:11:39 +00:00
curt
b0b6c34249 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. :-)
2001-04-11 02:47:15 +00:00
curt
182fd42b40 SG-ified logstream. 2001-03-24 06:03:11 +00:00
curt
17c96ae69e SG_ namespace 2001-03-24 04:48:44 +00:00
curt
cdd3082998 MSVC fixes. 2001-03-21 23:10:15 +00:00
curt
c3e3e9f5d7 Reduce spurious output from joystick.cxx
Fix a typo in JSBSim.cxx (#endif in wrong place)
2001-01-29 15:14:12 +00:00
curt
e9b492af4f More tweaking of position reset logic. 2001-01-17 23:30:35 +00:00
curt
a5e4e6be11 Working on setting initial altitude correctly after a reset. 2001-01-17 20:32:02 +00:00
curt
e333080388 MacOS changes contributed by Darrell Walisser (12/13/2000) 2000-12-13 23:02:02 +00:00
curt
95d6d93bed Renamed FGBucket -> SGBucket. 2000-12-13 20:36:04 +00:00
curt
a775392e31 Bring lights in in stages as it get's darker. 2000-12-04 23:25:05 +00:00
curt
d3c4018baa Started laying out the infrastructure for handling lighting.
Started experimenting with ground lighting.
2000-12-04 05:24:38 +00:00
curt
39632b90b8 Rewrote the tile scheme to use a "map" structure rather than "vector"
structure.  The new approach is simpler, more flexible, and more dynamics.
We can now dynamically size the tile cache up and down.  Also, the range
of tiles to load is now dependent on visibility and is calculated to always
bring in enough tiles.
2000-12-03 20:15:46 +00:00
curt
d79bfda33f A couple clean ups ... 2000-11-02 00:59:39 +00:00
curt
35819b8c4d Check point ... making progress with a FGViewerLookAt class so we can
more easily do nifty external views.
2000-10-26 18:10:28 +00:00
curt
0175b4cd25 Continued FGViewer cleanups. FGViewer is now a base class so that we can
derive specific viewer classes from it.  Here's what I currently have in mind:

FGViewer
  |
  |-> FGViewerPRH     (current system with orientation specified in
  |                    LaRCsim Euler angle convention)
  |
  |-> FGViewerLookAt  Feed in a position, view direction, and up vector
  |
  |-> FGViewerHPR     (similar to PRH, but using ssg hpr euler angle
  |                    convention)
  |-> others?
2000-10-25 22:59:02 +00:00
curt
470ee55fb7 Continuing work on cleanups.
Removed some commented out chunks of code that no longer make sense to keep
around.
Working on replacing instances of Point3D with sg{d,}Vec3.
2000-10-25 19:27:13 +00:00
curt
01c44cbb99 Code clean ups relating to FGOptions ... and moved it into globals-> space. 2000-10-19 21:24:43 +00:00
curt
ce574d59f5 The following changes were made to flightgear-0.7.5 code to implement the follow
ing features:

a) ADA Flight model - ADA.cxx, ADA.hxx, flight.hxx
b) Fighter a/c HUD       - flight.hxx, hud.hxx, hud.cxx, cockpit.cxx, hud_ladr.c
xx, hud_card.cxx
c) 3-window display      - options.hxx, options.cxx, viewer.cxx
d) Moving objects (ship) - main.cxx
e) Patches               - main.cxx

ADA.cxx, ADA.hxx
--------------------------
Interface to the external ADA flight dynamics package.

flight.hxx
----------
Included prototypes for accepting additional data fron the External flight
model for fighter aircraft HUD

Hud.hxx
-------
Included prototypes for accepting additional data for fighter HUD from Exernal F
light model.
Defined FIGHTER_HUD pre-processor directive to enable compilation of fighter hud
 code.

hud.cxx, cockpit.cxx, hud_ladr.cxx, hud_card.cxx
---------------------------------------
Included code to initialise additional reticles/text for fighter HUD which is co
nditionally
compiled if FIGHTER_HUD is defined.

options.hxx
-----------
Added window_offset, and function to retrieve its value for 3 windows

options.cxx
-----------
Changed few options to suit ADA/CEF projection system/screens and checks for win
dow offset.

views.cxx
---------
Added code to retrieve view offset for window.

Main.cxx
--------
Added code to load and move an aircraft carrier.
Patch to enable clouds from command line until Curtis fixes it. By default cloud
s are disabled.
2000-10-19 19:46:13 +00:00
curt
32528d0cd6 A bit of fg->sg namespace changing. 2000-09-27 20:16:22 +00:00
curt
3d47d2284e Tweaks ... 2000-09-06 00:11:01 +00:00
curt
0537a0ac84 Norman's changes to make the current scenery normal available. 2000-08-09 21:35:17 +00:00
curt
941f27c9a0 Updates to move scenery initialization earlier in the initialization
sequence so that the FDM can know the current ground altitude when it is
initialized.
2000-07-23 21:32:59 +00:00
curt
0ffa19cd32 Updates to JSBsim from Jon's CVS.
Massaging some names inside of SimGear.
2000-07-06 22:13:24 +00:00
curt
db6da3a896 Various odds and ends tweaks. 2000-06-30 21:46:41 +00:00
curt
39ae3864de Cleaned up all the old fragment and material_mgr stuff which originated
from the pre-ssg / render everything ourselves days.  Replaced with a
material library manager that is much better suited for working in the
context of ssg.  This simplified and cleaned up a ton of old junk.
2000-06-23 00:30:04 +00:00
curt
cb1d2d96d1 Fix for reset/reloading tiles. 2000-06-20 04:48:12 +00:00
curt
cd1a471f7e Updates, optimizations, and restructures from Norman Vine. 2000-06-15 22:32:26 +00:00
curt
e8d1596ec7 Added cur_radius (radius in meters from the center of the earth) to the
current terrain elevation structure.
2000-05-15 18:19:17 +00:00
curt
afcf4d4324 Tweaks. 2000-04-21 05:27:13 +00:00
curt
cc26bb7fe7 Removed all dependencies on <simgear/math/mat3.h> and friends. These are
old routines from SRGP.  Steve's plib/sg.h does a nice job of completely
replacing this (and since plib is already around) and is a nice clean design
so it just makes sense.
2000-02-19 14:29:27 +00:00
curt
1294aed465 One more pass at a reorg. 2000-02-16 23:01:03 +00:00
curt
485230b443 Code reorganization. 2000-02-15 03:30:01 +00:00
curt
9a207fb4e1 MacOS fixes contributed by Darrell Walisser on 1/26/2000. 2000-02-10 23:37:56 +00:00
curt
095c069b39 Updated for plib-1.1.x 2000-02-04 22:50:04 +00:00
curt
0b181d91c8 Tweaks to ssg LOS routines and the use of it for height above ground
calculations.
1999-11-04 22:55:00 +00:00
curt
846ac621a2 Tweaks to my ssg LOS routines and their usage. 1999-11-04 00:41:23 +00:00
curt
1d6675a895 Debug output tweaks. 1999-11-03 23:50:15 +00:00
curt
bd198f503b Began work on adding support for loading additional 3d models per tile.
Began work on my own ssgLOS() (line of sight) routine.
1999-11-03 21:01:59 +00:00
curt
eddea671a2 Upgraded to latest weather data base code from Christian Mayer's and make
it the default.
1999-10-14 20:30:54 +00:00
curt
04619e469f Debugging output tweaks. 1999-09-28 22:44:23 +00:00
curt
bbced46d9f Tweaks to fix problems with moon rendering introduced with ssg. 1999-08-15 15:35:07 +00:00
curt
58a8b0d103 Minor tweaks. 1999-08-14 22:07:35 +00:00
curt
e945d2b761 Christian's new weather subsystem is causing problems with some compilers
so I am allowing it to be #ifdef'd out until the compile problems can be
resolved.
1999-08-12 17:13:44 +00:00
curt
8b2e57a93d Updated to support new weather subsystem (visibility variable determins
how far out the scenery should be drawn.)
1999-08-10 03:45:47 +00:00