1
0
Fork 0
Commit graph

204 commits

Author SHA1 Message Date
curt
d359a103c5 Rename a variable so we don't have to rely on scoping rules to distinguish
between the same veriable name used twice.
2003-01-10 17:01:57 +00:00
david
c3398c9add Have DummyBSphereEntity inherit from ssgBranch instead of ssgEntity,
to allow building with the latest plib CVS.

Problem identified by Norm Vine.
Fix suggested by Steve Baker.
2002-12-11 21:49:25 +00:00
curt
43e48070fe - Some refactoring of the configure.ac script.
- Better Mac OS X support (they put glut.h in GLUT/glut.h) :-(
2002-12-10 20:50:48 +00:00
curt
98dca16794 Having the runway lights "pop" in at a specific range is not 100% realistic.
I have updated the lighting code to use fog to try to fade the runway lights
in smoothly, but still keep them from being visible until you are about 7-10
miles out, and then only have them be very faint at first.  I think what I
have is a bit nicer than before since it completely avoids the "popping" effect,
but I've very open to tweaking the actual ranges based on people's real
world experiences.
2002-11-26 02:29:03 +00:00
curt
019b31ea26 Make the runway lights come on just a bit sooner in terms of sun angle. 2002-11-25 21:42:07 +00:00
curt
52a322decc Some various massaging and clean ups of initialization code. 2002-11-16 20:17:11 +00:00
david
c5ebb65efd Turn off runway lights during the day, except in less than 5km
visibility (that should be lower, but it will do for now).
2002-11-16 11:56:15 +00:00
curt
52312f2a13 Restructuring some of the initialization code.
The general idea is to help clean up some aspects of the FDM init and be
able to provide startup conditions in a less ambiguous manner.

Previously, things like positions, orientations, and velocites were set on
"the bus".  These had to be read by the FDMs which then were supposed to
initialized themselves to those values and turn write around and start
modifying those values.  It was messy and cumbersome.

Now, all the initial fdm conditions are written to a sub-[property-]tree
under /sim/presets/

The values in /sim/presets/ always stay set to what the user has specified.
The user can change these at his/her liesure, and then request a "reset"
which will reset to the new conditions.  I don't even want to say how this
worked before. :-)

Now, an script, or gui interface can stage a set of initial conditions while
the sim is running (without disrupting it), and then call "reset" to commit
the change.

People who should worry about all this are FDM writters, and a small few
others who care about over all program structure and flow.
2002-11-15 21:13:29 +00:00
curt
b57a78e637 Cleaned up some debugging output. 2002-11-04 16:58:54 +00:00
curt
925126fa6b Add support for drawing ODALS approach lighting. 2002-11-04 16:34:42 +00:00
curt
dbf997a2d3 Put taxiway lights in their own scene graph so we can adjust their brightness
(or fog punch through) independently from the ground or runway lighting.
2002-11-01 21:56:48 +00:00
curt
a9b9e9d155 Tweak red and blue runway light colors a bit more. 2002-10-24 14:02:06 +00:00
curt
bbf33cc7cb White space tweak ... 2002-10-24 12:11:55 +00:00
curt
aff9655029 Tweak lighting colors a bit. Add a slight yellow tint to "white" lights.
Add a slight orange tint to "yellow" lights.  Brighten the blue lights a bit
to make them more visible.
2002-10-23 16:29:53 +00:00
curt
95f46806c2 Tone down the relative intensity of the taxiway lights. 2002-10-22 04:12:33 +00:00
curt
13813f9143 Added support for taxiway lights that are much more visible from the size
than from above.
2002-10-22 03:57:32 +00:00
curt
86d586e592 Make runway lighting LOD work correctly. 2002-10-21 19:45:21 +00:00
curt
15b6f15d36 Misc clean ups. 2002-10-21 16:26:48 +00:00
curt
4496bf341d Preallocate proper ssg list sizes when building list structures so plib
doesn't need to waste time extending it's list sizes.
2002-10-21 16:26:34 +00:00
curt
a4c06de42f Fix a bug with rabbit light creation. 2002-10-21 16:09:11 +00:00
david
d7662bceb8 Put cout and endl in std:: namespace. 2002-10-19 10:27:52 +00:00
curt
9c561ab860 Add a pre/post draw call back to strobe lights so we can make them bigger
so they will stand out from everything else.
2002-10-18 18:43:50 +00:00
curt
89ede45989 There are some problems with ssgTimedSelector's but shorter strings of
rabbit lights appear to almost work except the last light or two is never
included in the animation and longer strings of lights are drawn as all
light on ... :-(
2002-10-18 03:36:56 +00:00
curt
bbdca39e3b Some restructuring to optimize the light point portion of the scene graph.
There's no point in having a separate leaf for each light.
2002-10-17 23:17:16 +00:00
curt
a01f92f0d1 Support green directional lights. 2002-10-17 15:52:32 +00:00
curt
050f44adc8 Cleaned some cruft. 2002-10-17 03:11:10 +00:00
curt
9d5281a5d1 Add support for generating REIL approach light animations. 2002-10-17 03:08:46 +00:00
curt
66bd17bfa3 Add support for additional runway light colors and intensities. 2002-10-16 22:39:08 +00:00
curt
470d233f0d Eric Hofman:
Now the options can be localized as well. This adds a slight problem for
the --language options, but not that much (worst case, the strings are
loaded twice consuming some more memory). I tried to be as accurate as
posiible when copying the options texts, but there might be some
mostakes left.
2002-10-10 15:02:50 +00:00
curt
83314d3f45 Fix a potential crash with William Riley's scenery build. 2002-10-09 14:29:42 +00:00
curt
257c065d81 misc tweaks. 2002-10-09 14:15:08 +00:00
curt
f54302e9e9 Begin work on improving runway lighting infrastructure. 2002-10-09 03:40:23 +00:00
curt
e74c4d9437 Oops, I had my lighting tris wound the wrong way. 2002-10-08 22:25:41 +00:00
curt
cf96178ea8 Misc clean ups. 2002-10-06 04:27:24 +00:00
curt
c162577340 Begin work on rendering runway lights using environment maps. The basics
are now working.  A runway light is defined by a point and a direction.  The
point and direction are combined with the local up vector to create a small
triangle orthogonal to the direction.  The two ficticous corners of the
triangle are given an alpha value of zero, the orignal corner is given an
alpha of one.  The triangle is drawn in glPolygonMode(GL_FRONT, GL_POINT)
mode which means only the corner points are drawn, and since two have alpha=0
only the original point is drawn.  This is a long way to go to draw a point,
but it ensures that the point is only visible within 90 degrees of the light
direction, behind the light it is not visible.  This is still a long way
to get to drawing a point, but we use an environement map, with the direction
vector as the normal to mimic a light that is brightest when viewed head
on and dimmest when viewed perpendicularly or disappears when viewed from
behind.

- warning, there is a bug in how the current runway light direction vector
  is calculated which will adversely effect runway lighting.  The airports
  should be regenerated in order to fix this problem.
2002-10-06 03:53:19 +00:00
david
ee6f6ecf61 Turn the runway lights on during the day when visibility is less than
5000m (about 3SM).
2002-10-04 00:23:40 +00:00
curt
c5f7f15f5b Updated from Norman to hack on clouds ... some progress. 2002-09-18 14:57:20 +00:00
curt
f8abc6d848 Fixed: When you select Menu->Autopilot->Set Heading nothing happens. 2002-09-11 16:51:23 +00:00
curt
2da005377e Fix a typo that could cause a crash on some platforms. 2002-09-07 14:15:10 +00:00
curt
4f00d9a959 Tidy up the autoconf/automake configuration a bit.
- Removed some old cruft.

- Removed some support for older versions of automake which technically was
  correct, but caused the newer automakes to squawk warnings during an
  initial sanity check (which isn't done very intelligently.)

  NOTE: this fix is technically not correct for older version of automake.
  These older version use the variable "INCLUDES" internally and could have
  them already set to an important value.  That is why we were appending
  our values to them.  However, newer versions of automake don't set this
  value themselves so it is an error to append to a non-existant variable.
  We seem to "get away" with overwriting the value on older versions of
  automake, but if you have problems, consider upgrading to at least
  automake-1.5.
2002-08-25 19:40:04 +00:00
curt
1b197dd8bf Bernie Bright:
Here are some changes that gave me a significant frame rate increase of about 10 fps with random objects disabled.  The interesting thing is that these changes aren't in the main loop but are in tile loader.  My guess is that I've reduced the memory footprint just enough to reduce CPU cache misses, though I have no hard evidence of this.

Initially I modified all SGBinObject member functions to pass/return by reference instead of by-value.  This gives little or no speed up but allows for some optimizations in fgBinObjLoad().  It is these changes that reduce the number of memory allocations.  Needless copying of vectors, and vectors of vectors, can be very memory intensive, especially if they are large.

Anyway I would be interested to see if you get similar results.  I would emphasize that the frame rate increase only occurs with random objects disabled.  I lose about 10-15 fps on my GF2MX 32MB with random objects, probably a fill-rate limitation or texture memory thing.
2002-08-23 19:53:48 +00:00
david
47b4dcd65f Random-object and -light placement optimizations from Norman Vine. 2002-08-08 23:09:02 +00:00
david
0ebe8ec8f0 Removed the FG3DModel class and replaced it with fgLoad3DModel.
Animations are now contained within the scene graph itself and are
updated whenever the graph is traversed -- that saves time by not
updating animations not currently in sight, and it allows animations
to be used for static objects and random objects as well.

Added new FGModelLoader and FGTextureLoader classes.  These are intern
tables for models, to guarantee (mostly) that no model is loaded more
than once.  FGTextureLoader is not yet used anywhere, but
FGModelLoader is now in place everywhere that ssgLoad* used to be
used (thus adding the ability to use animations).

In the future, FGModelLoader will add some interesting functionality,
including the ability to reload 3D models on the fly.
2002-08-07 01:34:49 +00:00
david
f253425973 Detabified for Norman Vine. 2002-08-05 20:14:28 +00:00
david
67fc66f82e Improve the random seed calculation slightly. 2002-08-04 19:10:13 +00:00
david
4cb99e05ad Patch from Dave Luff:
Your 3D models cause a stackdump when the base is separate from the
root.  I've attached a patched newmat.cxx - you may want to test it
before committing!
2002-07-31 18:44:30 +00:00
david
a5f251a5de Patch from Erik Hofman:
I changed the code such that textures terrain also takes ambient,
diffuse, specular and emissive from the materials.xml file.

[note from dpm: doesn't seem to work yet]
2002-07-31 17:57:59 +00:00
david
43d89cb8d6 Create a top-level branch in each tile for random objects with the
name "random-objects".

Put the random objects for each tile inside a top-level
ssgRangeSelector with a maximum range of 20km.  This saves a lot of
range tests for distant tiles, and gives about a 10% framerate boost
on my card at 1000ft AGL (possibly more on faster cards).
2002-07-27 14:29:57 +00:00
curt
f1eddc9bf4 No need to additionally ref() subcomponents of a tree. Only the root node
needs to be ref()'d.
2002-07-26 23:27:53 +00:00
david
f05e8f95e2 Some renaming, since there wasn't really a tile-level LOD. 2002-07-26 22:12:29 +00:00