1
0
Fork 0
Commit graph

266 commits

Author SHA1 Message Date
curt
d05121ef46 Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
ehofman
7f6466d6f1 Frederic Bouvier:
This is a patch to make display list usage optional. They are on by default.
Use --prop:/sim/rendering/use-display-list=false to use immediate mode.
There is also a change in exception handling in main.cxx and bootstrap.cxx
2004-10-17 17:23:19 +00:00
ehofman
c0c394c188 PLIB_VERSION is localted in plib/ul.h 2004-10-10 19:19:23 +00:00
ehofman
b7afe856c3 Check for the plib version when using display lists, just to be sure. 2004-10-10 19:06:32 +00:00
ehofman
f61014c2ea Frederic: Add display list support without changing plib. 2004-10-10 17:41:11 +00:00
ehofman
986492d72d Finish what was committed in a broken state yesterday.
Split up main.cxx into a program manegement part (which remains in
main.cxx) and a render part (the new renderer.?xx files). Also turn
the renderer into a small class of it's own. At this time not really
exctining because most of the stuff is still global, but it allows us
to slowly migrate some of the global definitions into the new class.

The FGRenderer class is now managed by globals, so to get the renderer
just call gloabals->get_renderer()

At some pijt it might be a good idea to also turn the remaining code in
main into a class of it's own. With a bit of luck we end up with a more
robust, and better maintainable code.
2004-09-20 13:21:51 +00:00
ehofman
3b3600fd21 Make it compile, link and run again (pfew\!) 2004-09-19 18:34:47 +00:00
ehofman
de47d1a7d8 Revert to CVS as of 5000 seconds ago. 2004-09-19 17:59:40 +00:00
ehofman
409dee5a9d Remove unnecessary inclusions of sg.h ans ssg.h 2004-09-19 16:33:38 +00:00
curt
cc3d0221ea Make a subtle change to tile loading/unloading policy in order to make the tile
paging system much more robust when position change is very rapid and sporadic.

Recall that we must load 3d models in the main render thread because model
loading can trigger opengl calls (i.e. with texture loading) and all opengl
calls *must* happen in the main render thread.

To accomplish this we load the base tile in the pager thread and build a work
queue of external models that need to be loaded.  We never allow a tile to be
paged out of the tile cache until all it's pending model loads are complete.

However, when changing position very rapidly, we can quickly create a huge
backlog of pending model loads because we are changing positions faster than we
can load the associated models for the existing tiles.  The end result is
that tiles that are long out of range can't be removed because there is still
a huge backlog of pending model load requests and memory blows up.

This change being committed allows the tile paging system to remove tiles
if they are out of range, even when there are pending models to load.  The
model loading code in the render thread can now check to see if the tile
exists and discard any model load request for tiles that no longer exist.

This situation should never occur in normal operation, but could occur in
"contrived" situations where an external script was rapidly changing
the simulator position to then be able to query FG terrain height, and doing
this for a large number of points that are distributed across a large area.
2004-09-15 15:52:05 +00:00
ehofman
9d972d86bf Jim Wilson: This patch prevents FDM execution until intial scenery load completes making
midair starts in the KSFO area possible again.
2004-07-22 16:42:14 +00:00
ehofman
56f085b6f1 Melchior FRANZ:
Remove an unused test, counter_hack is initialized to 0 and the test never reaches the increment section but instead will always call loader.update();
2004-06-13 18:47:55 +00:00
ehofman
ff9258528c Melchior FRANZ:
Wouldn't it be better to prepare the whole list of paths (or two
separate ones for Terrain/Objects if necessary) in FGGlobals::set_fg_scenery,
and to pass the vector<string>s to FGTileEntry::load? It doesn't seem to make
a lot of sense to split the path up, modify it, mount it together to one string
again, and then let FGTileEntry::load split it up again.

Here we go:

Main/globals.cxx
================
As fg_scenery is now a string_list, we don't need initialization. Furthermore,
this list is cleared with every set_fg_scenery() call.

ctor: create default dir from fg_root if necessary. Otherwise check all paths
of --fg-scenery/FG_SCENERY: If the path doesn't exist, ignore it. If it contains
a dir Terrain and/or Objects, then only add that to the list. If it contains
neither, then use the path as is.


Scenery/tileentry.cxx
=====================
Trivial: don't split a "base path", but use the given path_list as is.
(I considered a variable name "path_list" better suited than "search".)


Scenery/FGTileLoader.cxx
========================
No more fiddling with sub-paths. This has to be delivered by get_fg_scenery
already.
2004-06-08 15:32:09 +00:00
ehofman
079890e955 Make use of the new SGPath::add() function and automatically append 'Terren' and 'Objects' the the scenery path when one or both of those subdirectories exsist. 2004-06-07 09:52:11 +00:00
ehofman
1bdcbd69f3 Windows uses ';' instead of ':' as a path separator. 2004-06-06 19:34:31 +00:00
ehofman
372920236f Make it possible to split the Scenery into Scenery/Terrain and Scenery/Objects in preparation for the next scenery release. 2004-06-06 19:15:04 +00:00
andy
7ceb85d454 Changes to get FlightGear (well, the src directory at least) to
configure and compile out-of-the-box on a MinGW target:

Use -lSDL instead of -lglut32 on windows builds when --enable-sdl
is set.

Link against alut.dll in addition to openal32.dll.

Replace BSD bcopy() with ANSI C memmove() in a few places.  This is
simpler than trying to abstract it out as a platform dependency in a
header file; bcopy() has never been standard.

The ENABLE_THREADS handling has changed to be set to 0 when threads
are not in use.  This breaks expressions like #ifdef ENABLE_THREADS.
Replace with a slightly more complicated expression.  It might have
been better to fix the configure.ac script, but I didn't know how and
this whole setting is likely to go away soon anyway.

The MinGW C runtime actually does include snprintf, so only MSVC
builds (and not all WIN32 ones) need _snprintf in JSBSim/FGState.cpp

Building on a platform with no glut at all exposed some spots where
plib/pu.h was being included without a toolkit setting (it defaults to
glut).  Include fg_os.hxx first.

And when still using glut, glut.h has a bizarre dependency on a
_WCHAR_T_DEFINED symbol.  It it's not defined, it tries to redefine
(!!) wchar_t to disasterous effect.
2004-04-30 00:52:11 +00:00
ehofman
7902c04905 Plib is willing callbacks to return 0, 1 or 2 and not simply a boolean 2004-04-02 19:49:51 +00:00
ehofman
b34f0711c4 Frederic Bouvier:
Add a static function that will be installed as a callback to
  cull or not the terrain leaves in tiles.
  Add a function to set the filter.
2004-04-02 14:42:42 +00:00
ehofman
c98daef926 Frederic Bouvier:
Add a pretrav callback to the first kid of geometry that should
  be the terrain_branch. The callback is a static function in
  FGTileMgr
2004-04-02 14:42:03 +00:00
curt
2acdd02879 Clean up various compiler warnings that have crept into the code. This
by no means get's them all, but it's a start.
2004-04-01 15:27:53 +00:00
ehofman
cf96deac29 Frederic Bouvier:
The message 'Alert: catching up on tile delete queue'
comes from the fact that 48 tiles are scheduled and
added to the cache at startup before the plane location
is initialized. My proposed patch is to initialize
SGLocation with an invalid position and detect this
fact before scheduling tiles. I prefer to do that
rather than testing for lon and lat being 0,0 because
it is a valid position and someone could want to fly
near Accra.
2004-03-20 22:42:41 +00:00
curt
a1a68b9c93 Various preparations for the next release. 2004-03-18 02:37:01 +00:00
curt
72f2c5c4f4 Fix a type ... 2004-01-26 22:44:27 +00:00
curt
492d5fbd8d Fix a small mistake in the scene graph arrangement for vasi lights. 2004-01-11 19:45:29 +00:00
curt
461baef128 Add a small optimization to reduce the amount of vasi computation that is
done every frame.
2003-12-30 15:12:04 +00:00
curt
a80b033104 Smarter vasi/papi coloring. 2003-12-30 07:04:40 +00:00
curt
3d7f467c61 First stab at correct vasi/papi coloring. This is still rough and doesn't
account for variation in lighting alignment, but it's more useful than the
previous attempt which was based on a misunderstanding of how environment
mapping worked.
2003-12-30 05:57:25 +00:00
andy
439a9fa1e4 Minor API changes to support the new sg_geodesy implementation. A few
places now use sgCartToGeod() instead of rolling their own
approximation.  And YASim is now using exactly the same 3D coordinate
system as the rest of FlightGear is.
2003-12-19 02:42:32 +00:00
curt
071a3d99b9 The code to find the highest hit below you didn't work quite right when
reinitializing at a new location.  This should fix the problem.
2003-11-25 01:08:39 +00:00
david
e95e9bbf4e Oops -- checked in last version with a small typo. 2003-11-24 18:00:48 +00:00
david
d296e5a7df Use proper logging facility, and lower the priority of some of the
logging messages.  This is part of an effort to make FlightGear a bit
quieter during normal operations.
2003-11-24 17:45:35 +00:00
curt
a62e09d72b Comment out timing calls, but leave them there for future timing experiments. 2003-11-24 01:47:09 +00:00
ehofman
4626ff428d Make sure SGTimeStamp is found 2003-11-22 12:03:10 +00:00
curt
f6fad7f000 Tweaks and massages to the ground intersection code. Most of the changes
are cosmetic, but we now have a combination of code that seems to work
very robustly.  I was able to land the yf23 at about 130 kts on the lower
level of the bay bridge and then taxi the entire length.
2003-11-21 22:00:46 +00:00
curt
ca6067cbc0 With this patch, you can fly under bridges, then turn around and land on
them lengthwise.
2003-11-21 04:41:01 +00:00
curt
0f1c24bbed Fix a terrain intersection calculating bug. The code wasn't quite handling
traingle strips right ... it was mixing up the vertex ordering slightly.
Oh what the heck, it was really screwing up tristrips.  Everything else looks
correct though. :-)  Hurray for the red book.
2003-11-21 03:13:52 +00:00
david
03741a6936 Modified so that a multiple-element FG_SCENERY path will work:
1. Do not stop scanning STG files after OBJECT_BASE is found.

2. Load OBJECT_BASE only once.

3. Load OBJECT only when no OBJECT_BASE has been found or when
   OBJECT_BASE was found in the same file (probably should be only the
   latter, if we constrain OBJECT_BASE always to come first).

4. Always load OBJECT_STATIC and OBJECT_SHARED.
2003-10-01 22:49:06 +00:00
david
65177d27f5 Don't make SG_SCENERY into an SGPath before splitting, to avoid
normalizing ':' to '/'.
2003-10-01 22:38:53 +00:00
curt
905b48c55c Sort VASI lights into their own tree so we can control them separately
from the rest of the runway lighting.  VASI/PAPI lights are generally
always on.  Also, the red/white VASI coloring has never worked right.
This is also a step towards fixing that problem.
2003-09-24 19:59:25 +00:00
ehofman
980012e168 Move FGEventMgr and FGSubsystemMgr over to SimGear, add SGEventMgr to FlightGear's globals structre and some small code cleanups 2003-09-24 17:20:55 +00:00
ehofman
a33ad90ed7 Convert fgLIGHT to FGLight and make it FGSubsystem compatible. Let the subsystem manager handle it and let FGLight::update() handle the repositioning of the sun and the moon. 2003-09-20 09:38:32 +00:00
ehofman
7249aaea33 Frederic Bouvier:
This patch is there to correct a problem that prevent to load static objects when specifying a relative fg-root or a different, relative, fg-scenery. It appears that there is a mix between fg-root, fg-scenery and PLIB's model-dir.
It has been reported on the list that users are not able to see the buildings, especially those running the win32 builds because they run 'runfgfs.bat' that set FG_ROOT=./DATA.

I decided not to use model-dir because it just add confusion and to build a valid path earlier.
2003-09-13 11:47:30 +00:00
ehofman
1dea70fffa Use the glPointParameter function pointer rather than the function itself 2003-08-29 16:50:20 +00:00
ehofman
82ba3ebbde Remove a possible glut dependency and do some code cleaning 2003-08-29 16:46:21 +00:00
curt
b23183f018 Put the id of the tile we are flying over into the property tree for
convenience of debugging.
2003-08-28 20:52:34 +00:00
ehofman
c745a8f956 Add a comment on how to enable an alternative HOT algorithm that enables one to fly underneath static objects 2003-08-18 09:34:12 +00:00
curt
02b758c87b Oops, fix a typo. 2003-08-09 02:45:23 +00:00
curt
b206ef0a4b Add support for specifying a ";" delimited list of scenery locations to
search when loading scenery tiles.  (I am not set on using ";" as the
delimiter because it is a command separator in unix, but ":" is a critical
part of the windows file naming scheme (c:\foo\bar) so that is even worse.)

Example:

--fg-scenery=/stage/fgfs04/curt/Scenery-0.9.1/Scenery;/stage/helio1/curt/Scenery
-0.7.9
2003-08-08 20:11:22 +00:00
ehofman
f46bda0621 A bounding sphere may be empty, which is perfectly valid.
Such empty spheres have negative radius, but undefined center.
2003-06-04 09:57:11 +00:00