curt [Thu, 27 Aug 1998 17:01:55 +0000 (17:01 +0000)]
Contributions from Bernie Bright <bbright@c031.aone.net.au>
- use strings for fg_root and airport_id and added methods to return
them as strings,
- inlined all access methods,
- made the parsing functions private methods,
- deleted some unused functions.
- propogated some of these changes out a bit further.
curt [Thu, 20 Aug 1998 15:12:03 +0000 (15:12 +0000)]
Used a forward declaration of classes fgTILE and fgMATERIAL to eliminate
the need for "void" pointers and casts.
Quick hack to count the number of scenery polygons that are being drawn.
curt [Wed, 12 Aug 1998 21:13:03 +0000 (21:13 +0000)]
material.cxx: don't load textures if they are disabled
obj.cxx: optimizations from Norman Vine
tile.cxx: minor tweaks
tile.hxx: addition of num_faces
tilemgr.cxx: minor tweaks
Output position & orientation when pausing.
Eliminated libtool use.
Added options to specify initial position and orientation.
Changed default fov to 55 degrees.
Added command line option to start in paused or unpaused state.
material.cxx: whups, double method declaration with no definition.
obj.cxx: tweaks to avoid errors in SGI's CC.
tile.cxx: optimizations by Norman Vine.
tilemgr.cxx: optimizations by Norman Vine.
fg_time.cxx: Removed call to ctime() in a printf() which should be harmless
but seems to be triggering a bug.
light.cxx: Added code to adjust fog color based on sunrise/sunset effects
and view orientation. This is an attempt to match the fog color to the
sky color in the center of the screen. You see discrepancies at the
edges, but what else can be done?
sunpos.cxx: Caculate local direction to sun here. (what compass direction
do we need to face to point directly at sun)
Clear to adjusted fog color (for sunrise/sunset effects)
Make call to fog sunrise/sunset adjustment method.
Add a stdc++ library bug work around to fg_init.cxx
Added far clip plane to fragment clipping calculations and tie this to
weather->visibility. This way you can increase framerates by increasing
for and lowering visibility.
Tweaked color buffer clearing defaults. We clear the color buffer if we
are doing textures. Assumptions: If we are doing textures we have hardware
support that can clear the color buffer for "free." If we are doing software
rendering with textures, then the extra clear time gets lost in the noise.
Replace the hud rendering for loop (which linearly searches the the hud
list to find the entry with the proper position) with a simple linear
traversal using an "iterator."
"H" / "h" now control hud brightness as well with off being one of the
states.
Better checking for xmesa/fx 3dfx fullscreen/window support for deciding
whether or not to build in the feature.
Translucent menu support.
HAVE_AUDIO_SUPPORT -> ENABLE_AUDIO_SUPPORT
Use fork() / wait() for playing mp3 init music in background under unix.
Changed default tile diameter to 5.
Added ground collision detection. This involved:
- saving the entire vertex list for each tile with the tile records.
- saving the face list for each fragment with the fragment records.
- code to intersect the current vertical line with the proper face in
an efficient manner as possible.
Fixed a bug where the tiles weren't being shifted to "near" (0,0,0)
Added ground collision detection.
Did some serious horsing around to be able to "hug" the ground properly
and still be able to take off.
Set the near clip plane to 1.0 meters when less than 10 meters above the
ground.
Did some serious horsing around getting the initial airplane position to be
correct based on rendered terrain elevation.
Added a little cheat/hack that will prevent the view position from ever
dropping below the terrain, even when the flight model doesn't quite
put you as high as you'd like.
Removed some printf()'s.
Fixed the autopilot integration so it should be able to update it's control
positions every time the internal flight model loop is run, and not just
once per rendered frame.
Added a routine to do the necessary stuff to force an arbitrary altitude
change.
Gave the Navion engine just a tad more power.
Added fgFlightModelSetAltitude() to force the altitude to something
other than the current altitude. LaRCsim doesn't let you do this by just
changing FG_Altitude.
Fix GL_MODULATE vs. GL_DECAL problem introduced by splash screen.
polare3d.h renamed to polar3d.hxx
fg{Cartesian,Polar}Point3d consolodated.
Added some initial support for calculating local current ground elevation.
polar3d.h renamed to polar3d.hxx
vector.h renamed to vector.hxx
updated audio support so it waits to create audio classes (and tie up
/dev/dsp) until the mpg123 player is finished.
Added an enable/disable splash screen option.
Added an enable/disable intro music option.
Added an enable/disable instrument panel option.
Added an enable/disable mouse pointer option.
Added using namespace std for compilers that support this.
Added support for switching between fullscreen and window mode for
Mesa/3dfx/glide.
Added a basic splash screen. Restructured the main loop and top level
initialization routines to do this.
Hacked in some support for playing a startup mp3 sound file while rest
of sim initializes. Currently only works in Unix using the mpg123 player.
Waits for the mpg123 player to finish before initializing internal
sound drivers.
Add my own version of gluLookAt() (which is nearly identical to the
Mesa/glu version.) But, by calculating the Model View matrix our selves
we can save this matrix without having to read it back in from the video
card. This hopefully allows us to save a few cpu cycles when rendering
out the fragments because we can just use glLoadMatrixd() with the
precalculated matrix for each tile rather than doing a push(), translate(),
pop() for every fragment.
Panel status defaults to off for now until it gets a bit more developed.
Check for full screen (no windows system support) before having PUI draw
it's ugly excuse for a mouse. :-) The check is probably not general enough,
but it can be improved as more and varied hardware is tested.