1
0
Fork 0
Commit graph

354 commits

Author SHA1 Message Date
curt
35f24baf32 Clean ups to the code that determines initial position based on command
line options or defaults.
2002-11-16 21:34:51 +00:00
curt
52a322decc Some various massaging and clean ups of initialization code. 2002-11-16 20:17:11 +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
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
72017fc671 Andy Ross:
The biggest and coolest patch adds mouse sensitivity to the 3D
cockpits, so we can finally work the radios.  This ended up requiring
significant modifications outside of the 3D cockpit code.  Stuff folks
will want to look at:

+ The list of all "3D" cockpits is stored statically in the
   panelnode.cxx file.  This is clumsy, and won't migrate well to a
   multiple-aircraft feature.  Really, there should be a per-model list
   of 3D panels, but I couldn't find a clean place to put this.  The
   only handle you get back after parsing a model is a generic ssg
   node, to which I obviously can't add panel-specific methods.

+ The aircraft model is parsed *very* early in the initialization
   order.  Earlier, in fact, than the static list of allowable command
   bindings is built in fgInitCommands().  This is bad, as it means
   that mouse bindings on the instruments can't work yet.  I moved the
   call to fgInitCommands, but someone should look carefully to see
   that I picked the right place.  There's a lot of initialization
   code, and I got a little lost in there... :)

+ I added yet another "update" hook to the fgRenderFrame routine to
   hook the updates for the 3D panels.  This is only required for
   "mouse press delay", and it's a fairly clumsy mechanism based on
   frame rate instead of real time.  There appears to be delay handling
   already in place in the Input stuff, and there's a discussion going
   on about different mouse behavior right now.  Maybe this is a good
   time to unify these two (now three) approaches?
2002-10-29 19:44:03 +00:00
curt
4c2e97be18 Default to experimental point lighting disabled. 2002-10-24 14:05:40 +00:00
curt
b0d12281c8 Minor tweak to avoid some compile errors people are seeing with the
glPointParameterExt.
2002-10-21 03:22:27 +00:00
curt
55b7dc661e Playing with glPointParameterfEXT. 2002-10-17 04:34:32 +00:00
curt
4ef75aa6c8 Playing with point lighting effects. 2002-10-16 03:44:44 +00:00
david
f962e24fee Use default visibility instead of modified sky visibility when 2D
clouds are disabled.
2002-10-13 10:46:37 +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
9dcf7dd13f Erik Hofman:
This adds supports for a language specific font, defined in locale.xml
I've also moved the fgInitLocale() routine from main.cxx to fg_init.cxx
to prevent an ungly extern definition in options.cxx.
2002-10-07 15:45:00 +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
curt
5cf14e78c4 Erik Hofman:
This patch fixes some bugs for correctly reporting un-updated
configuration files, and adds support for a --language=<code>
commandline option, overriding the language specified by the OS.
2002-10-04 15:19:07 +00:00
david
29eb5f7f5d Eliminated current_input and added FGInput to the subsystems managed
by FGSubsystemMgr.
2002-10-04 13:20:53 +00:00
david
38f0d6a35c First draft of subsystem manager; moved some subsystems into it. 2002-10-03 21:20:56 +00:00
curt
44fcbbd0af Better internationalization infrastructure. We now supports the "LANG"
environment variable.
2002-10-03 14:39:37 +00:00
david
03b508adb7 Support Dave Luff's AI plane if /sim/ai-traffic/enabled is set to
true.
2002-10-02 15:25:58 +00:00
david
c542559097 When the clock is frozen, set delta time to 0 so that the subsystems
won't keep updating themselves; that effectively freezes the
instrumentation.
2002-09-27 22:02:48 +00:00
david
682feb8f2d Flattened src/Systems/ subtree.
Added src/Instrumentation/ with partial stab at a vacuum-driven
attitude indicator.
2002-09-24 14:51:37 +00:00
curt
43af8026d8 More tweaks to opengl state management when drawing 3d clouds. 2002-09-23 22:05:36 +00:00
david
7c057de4fe Started new module and sub-modules for aircraft systems, including an
initial simplistic vacuum system that's not yet connected to anything.
2002-09-23 19:55:10 +00:00
curt
29e72b0b90 Various tweaks and fixes to navcom radios.
Oops, taking the address of a temporary in main.cxx: 3dcloud rendering.
2002-09-23 18:44:09 +00:00
curt
578073a6f3 Slightly cleaned up 3d cloud positioning code. 2002-09-23 13:34:51 +00:00
curt
e23b22fabe There is something wierd about moving the cloud base around, let's just leave
it rooted in place until we sort out the positioning.
2002-09-22 23:07:01 +00:00
curt
ab49022465 Patch to position 3d clouds at center of <current> tile. This means the clouds
jump whenever you cross a tile, but there are currently a lot of other
positioning problems as well, so this doesn't really detract too much and
means you can play with 3d clouds from just about any starting point.
2002-09-20 15:30:54 +00:00
david
2d7d0034d0 Do 3D cloud state changes only when 3D clouds are selected. 2002-09-20 14:01:06 +00:00
curt
53b9eacf74 Stabalize cloud shading. 2002-09-19 02:21:23 +00:00
curt
b350c6cd0f Miscellanious flailings trying to get 3d cloud imposter rendering to work
correctly.
2002-09-19 01:27:49 +00:00
curt
e0a7536e55 Erik Hofman:
This patch shows fatal error messages even when ./configure --disable-logging
is specified.
2002-09-18 16:13:08 +00:00
curt
c5f7f15f5b Updated from Norman to hack on clouds ... some progress. 2002-09-18 14:57:20 +00:00
curt
cc87fb93ba Updates for 3d cloud rendering. 2002-09-16 14:56:16 +00:00
curt
73c4fd481d Changed the clouds3d header install directory. 2002-09-15 04:32:49 +00:00
curt
82c87b2456 Updated the base package version required. 2002-09-14 01:58:40 +00:00
curt
bdde29e203 Update base package version. 2002-09-13 23:37:55 +00:00
curt
a4b3e35c0e Stubbed in initial support for 3d clouds. 2002-09-13 20:38:15 +00:00
curt
ed4a2e6db6 Darrell Walisser:
This allows it to behave like a certified Mac OS X citizen.
2002-09-10 19:43:33 +00:00
david
d4f92d6aff Removed unused cur_view_fdm variable as suggested by Bernie Bright. 2002-08-31 19:48:28 +00:00
curt
25c4d9b620 Minor tweaks to sound subsystem update rates. 2002-08-26 20:46:13 +00:00
curt
ee35eecb54 Erik Hofman:
I removed some pending random code and I also fixed a
small cosmetic glitch where dt_play was cleared before it was printed.

Curt: Erik changed the sound update intervale and I further I tweaked it.
The issue is that if we put too much into the sound buffer, then we can't react
quick enough to sounds like tire squeek that need to be synced with the visuals
and the action.  We put too little into the sound buffer and we risk the
audio dropping out for moment if a frame takes longer to draw than the amount
of audio in the buffer.
2002-08-25 23:27:00 +00:00
curt
df6989a37a Bernie Bright:
Here is a FGIO class derived from FGSubsystem that replaces the fgIOInit()
and fgIOProcess() functions.  The FGIO::update(double delta) doesn't use the
delta argument yet.  I suspect it could be used as a replacement for the
calculated interval value but I'm not familiar enough with that piece of code
just yet.

I've also added two "command properties" to fg_commands.cxx that select the
next or previous view.  Writing any value to these properties triggers the
corresponding action.  As an example I modified my keyboard.xml:

 <key n="118">
  <name>v</name>
  <desc>Next view</desc>
  <binding>
   <command>property-assign</command>
   <property>/command/view/next</property>
   <value type="bool">true</value>
  </binding>
 </key>

 <key n="86">
  <name>V</name>
  <desc>Prev view</desc>
  <binding>
   <command>property-assign</command>
   <property>/command/view/prev</property>
   <value type="bool">true</value>
  </binding>
 </key>

And of course these actions can also be triggered from external scripts via
the props server.
2002-08-25 20:56:16 +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
curt
94c44fc172 A couple fixes to the network fdm interface. 2002-07-30 04:37:16 +00:00
david
0178c65981 I totally misunderstood sgFrustum. This patch should put it right,
and also adds an optimization to avoid traversing anything closer than
1000m.
2002-07-26 01:52:51 +00:00
david
9bf3c10743 Change the extra culling to do only a quarter of the scene every 200
frames rather than the whole thing, to avoid tiny stutters.
2002-07-25 17:47:42 +00:00
david
1c35d89eb4 Fix a problem with the culling of out-of-range random objects. When
the triangles containing the objects were out of the view Frustum,
they were never traversed by ssg (and thus, never culled).  Now, every
200 frames, do a pass through the whole scene graph with cull-testing
disabled and without drawing anything; that will allow random-objects
to be collected incrementally.
2002-07-25 17:29:08 +00:00
curt
e85939a814 Removed some redundant glLight() calls. 2002-07-21 17:03:29 +00:00
curt
f330ae1234 Patch to explicitely control the specular lighting component. 2002-07-21 15:40:51 +00:00
david
5aee96c481 Change FGSteam into a proper subsystem rather than a collection of
static methods, and remove outdated dependency in panel_io.cxx.
2002-07-07 15:45:56 +00:00
curt
0ba0a278b9 Patch from Norman to do the code/base version comparison check a little
more sensibly (and print the correct error message.)
2002-06-07 23:26:07 +00:00