]> git.mxchange.org Git - simgear.git/log
simgear.git
18 years agoMathias Fröhlich:
ehofman [Mon, 5 Sep 2005 13:23:55 +0000 (13:23 +0000)]
Mathias Fröhlich:

There was a patch from Manuel Masing a few months ago which cleaned up
SGLocation's way depending on input values. That means that with that patch
SGLocation does no longer have calls with unneeded input arguments.
I took his patch and integrated that into flightgear and made maximum use of
that changes.

18 years agoMathias Fröhlich:
ehofman [Mon, 5 Sep 2005 09:02:56 +0000 (09:02 +0000)]
Mathias Fröhlich:

just a few split out patches from my zoo of local work ...

The patch to simgear-glxproc.diff changes dlopen to not open a specific library.
If it is used with a NULL argument, we just get a handle to the current running
binary including all loaded libraries. This has the advantage that we do not
rely on the name of libGL on the specific platform.
Also a user can link with his own different named libGL or with a static libGL.a

Then the render texture again ...

glxQueryVersion turns out to return the  minimum of the client libraries glx
version and the servers glx version. *All* Xorg servers return 1.2 here.
So we never get the glxPBuffer functions  which are the only ones working with
ati's drivers ...
Reverted back to checking the required functions and just use them if they are
there. Still prefering the glx standard variants since they work on ati's
drivers ...

18 years agoAdd some more defines as specified in FlightGear/src/Network/net_fdm_mini.hxx
ehofman [Mon, 5 Sep 2005 08:22:30 +0000 (08:22 +0000)]
Add some more defines as specified in FlightGear/src/Network/net_fdm_mini.hxx

18 years agoMac OS X fixes from Markus Morawitz
ehofman [Mon, 5 Sep 2005 08:17:37 +0000 (08:17 +0000)]
Mac OS X fixes from Markus Morawitz
stdint.h replacement defines for Windows and Sun from Frederic et all.

18 years agoHarald JOHNSEN:
ehofman [Mon, 22 Aug 2005 17:44:35 +0000 (17:44 +0000)]
Harald JOHNSEN:

- model.cxx :
  load the 2.5D panels before the animations so that the panels can be used in
  animations his solve the problem of 2.5D panels visible outside of the
  aircraft (one can add a null animation to put the panel at the top of the
  aircraft graph so it is drawn first) and this adds the possibility to have
  billboarded/popup panels.

- newcloud.cxx :
  removed 'this' pointer cast for amd64 compiler.

18 years agoCygwin fix.
ehofman [Wed, 10 Aug 2005 08:04:39 +0000 (08:04 +0000)]
Cygwin fix.

18 years agoHarald JOHNSEN:
ehofman [Sun, 31 Jul 2005 08:56:27 +0000 (08:56 +0000)]
Harald JOHNSEN:

added a cull test on fields

18 years agoFix a problem with systems that don't define GLXPbufferSGIX or GLXFBConfigSGIX
ehofman [Sun, 31 Jul 2005 08:46:37 +0000 (08:46 +0000)]
Fix a problem with systems that don't define GLXPbufferSGIX or GLXFBConfigSGIX

18 years agoHarald JOHNSEN:
ehofman [Sun, 31 Jul 2005 07:59:08 +0000 (07:59 +0000)]
Harald JOHNSEN:

This is the low level shader class for Simgear.
It's the code from Roman Grigoriev with a few adaptations.

18 years agoMacOS-X fixes.
ehofman [Wed, 27 Jul 2005 08:02:11 +0000 (08:02 +0000)]
MacOS-X fixes.

18 years agoJosh discovered a bug parsing negative numbers with leading zeros
andy [Thu, 21 Jul 2005 23:03:26 +0000 (23:03 +0000)]
Josh discovered a bug parsing negative numbers with leading zeros
("-0.3") which also affected ones of the form "-.3".  This got
introduced a few months back, I'm not sure how it went undetected for
so long...

18 years agoHarald JOHSEN:
ehofman [Mon, 18 Jul 2005 16:57:20 +0000 (16:57 +0000)]
Harald JOHSEN:

Changes
=======

- shadowvolume.cxx, renderer.cxx :
  - reduced the polygon offset a bit to eliminate some artifact ;
  - changed again the cleanup code for objects inside a tile because it could crash on rare occasion ;
  - the culling of shadow casters has been rewritten to traverse the scene graph, it should be
    a bit faster when there is a lot of objects ;
  - the range selector was not correctly handled, sometimes the wrong LOD was casting shadows.
  - added the option to display aircraft's transparent objects after the shadows, this will
    reduce the problem of shadows being hidden by the transparent object (propeller disk,
    rotor, etc). A side effect is that aircraft's transparent objects won't receive shadows
    anymore. This is usually a good thing except when the aircraft use a 'transparent'
    texture where it should not. A transparent texture in the plib context is a texture
    with an alpha channel or a material with alpha <= 0.99.

- model.cxx, animation.cxx, shadowvolume.cxx :
  - added an optional <condition> under the <noshadow> animation

- tower.cxx
  - correct a rare bug where all occurences of the aircraft are not deleted from the
  departure list causing a crash in FGTower::CheckDepartureList function.

18 years agoAdjustments to better support GLX1.3 and ATI drivers.
ehofman [Wed, 13 Jul 2005 12:00:30 +0000 (12:00 +0000)]
Adjustments to better support GLX1.3 and ATI drivers.

18 years agoHarald JOHNSEN:
ehofman [Wed, 6 Jul 2005 08:44:25 +0000 (08:44 +0000)]
Harald JOHNSEN:

Melchior has found another bug, I tried to skip some computation for a few
frames but that introduced some bad rendering bug with the aircraft moving
parts.
I corrected that and reduced a bit the cpu usage for ground objects.

19 years agoAnother update, the previous one could crash if you leave the surrounding tiles ...
ehofman [Tue, 5 Jul 2005 18:53:16 +0000 (18:53 +0000)]
Another update, the previous one could crash if you leave the surrounding tiles (try Set aircraft in air and choose a distant airport).

19 years agoSomehow gcc allows function overriding but MIPSpro doesn't. Fix this.
ehofman [Tue, 5 Jul 2005 18:00:58 +0000 (18:00 +0000)]
Somehow gcc allows function overriding but MIPSpro doesn't. Fix this.

19 years agoHarald JOHNSEN:
ehofman [Tue, 5 Jul 2005 17:08:27 +0000 (17:08 +0000)]
Harald JOHNSEN:

- shadow volume vertex are now shared, using DrawElements instead of repeated
  calls to glVertex, this can improve performance on some systems.
- added a rendering path that use the alpha channel instead of the stencill
  buffer.
- releasing memory when tiles objects are destroyed
- objects sub parts will not cast shadows if their name begins with "noshadow"
  or if they are in a <noshadow> animation

- bbcache.cxx :
   don't ask for a 32 bits context when the primary context is only 16 bits

- RenderTexture.cpp :
   corrected a crash when asking for a second rendering context
   on win32 and extensions not being supported

- model.cxx, animation.cxx :
   added a <noshadow> animation, added an animation type needed by the shadow
   code.

19 years agoMake sure it works with the lates version of OpenAL.
ehofman [Mon, 4 Jul 2005 09:20:11 +0000 (09:20 +0000)]
Make sure it works with the lates version of OpenAL.

19 years agoRestore the old behavior. Additions are likely.
ehofman [Thu, 30 Jun 2005 19:10:18 +0000 (19:10 +0000)]
Restore the old behavior. Additions are likely.

19 years agoMelchior FRANZ:
ehofman [Wed, 29 Jun 2005 09:41:07 +0000 (09:41 +0000)]
Melchior FRANZ:

- check for isTied() and refcount has to be made *before* we go into
  recursion, so as to pertain subtrees of refcounted nodes, even if there
  are no refcounted/tied nodes *in* this tree
- return value inverted, because it's more logical to say
  removeChildren() == true --> everything removed;  false --> failed
- further cleanup

19 years agoFrederic: Also copy the attributes over to the new tree.
ehofman [Tue, 28 Jun 2005 11:19:41 +0000 (11:19 +0000)]
Frederic: Also copy the attributes over to the new tree.

19 years agoDue to a misunderstanding of what removeChild() actually does, some used it to detach...
ehofman [Tue, 28 Jun 2005 11:19:09 +0000 (11:19 +0000)]
Due to a misunderstanding of what removeChild() actually does, some used it to detach a subtree from the main tree. The previous patch broke that behaviour so a new function call detchChild() is now added.

19 years agofix return value
ehofman [Mon, 27 Jun 2005 17:48:13 +0000 (17:48 +0000)]
fix return value

19 years agoMelchior FRANZ:
ehofman [Mon, 27 Jun 2005 13:49:28 +0000 (13:49 +0000)]
Melchior FRANZ:

- introduce removeChildren() and removeChildren(name)  to remove all children
  or all with a given name
- let removeChild() and removeChildren() also remove child trees, and let them
  return a "dirty" boolean that indicates if one or more subnodes had to be
  kept because of refcounting (removeChild returned a SGPropertyNode_ptr before)
- make alias/unalias increase/decrease the refcounter
- don't remove refcounted or tied nodes

This patch makes the SGPropertyNode_ptr actually useful. Until today, they did
proper refcounting (except for aliases), but no other part did check this counter.

But SGPropertyNode_ptr aren't only useful for the first time, they are now
highly recommended for every place that relies on a node address, and wants
to "lock" it (so that removeChild(ren) will never try to remove them). This
is not guaranteed for SGPropertyNode* (and never was). Of course, that's not
an imminent problem, as only four places currently use removeChild(ren) and
these are careful to only remove their own data.

19 years agoHarald JOHNSEN:
ehofman [Sun, 26 Jun 2005 17:16:45 +0000 (17:16 +0000)]
Harald JOHNSEN:

Changes
=======

New volumetric shadows for FlightGear.

There is now two new checkboxes in the rendering dialog to enable/disable shadows
for the user aircraft and for static scenery objects (ie those defined in the .stg files).
AI and random objects are not handled for the moment.

known bugs
==========
- ghost objects

19 years agoRemove the 'old' 3D clouds code.
ehofman [Sat, 25 Jun 2005 11:22:06 +0000 (11:22 +0000)]
Remove the 'old' 3D clouds code.

19 years agoMelchior: Make the (lack of) axis or center location definitions more consistent.
ehofman [Sun, 12 Jun 2005 11:23:28 +0000 (11:23 +0000)]
Melchior: Make the (lack of) axis or center location definitions more consistent.

19 years agoMelchior FRANZ:
ehofman [Sat, 11 Jun 2005 08:39:26 +0000 (08:39 +0000)]
Melchior FRANZ:

This is the more elegant solution that Andy had proposed in a response
to my RFC on Nasal initialization code in joystick configuration files.
As Nasal is initialized last (for good reason), subsystem can currently
not use it for initializing. postinit() is called on all subsystems
after all have been initialized.

19 years agofix a coredump situation, discovered by Melchior.
ehofman [Wed, 8 Jun 2005 14:07:53 +0000 (14:07 +0000)]
fix a coredump situation, discovered by Melchior.

19 years agoHarald JOHSEN:
ehofman [Mon, 30 May 2005 09:04:57 +0000 (09:04 +0000)]
Harald JOHSEN:

Changes
=======

- changed the rotation of sprites, they don't rotate strangely when we
  approach them now
- corrected the strange movement of clouds when banking quickly
- it no more rain above cloud layers
- add a radar echo container used by the weather radar instrument

19 years agoFix two crash conditions Ampere found. These are just temporary
andy [Sun, 29 May 2005 16:13:48 +0000 (16:13 +0000)]
Fix two crash conditions Ampere found.  These are just temporary
patches; my private version has rewritten both of these functions
(ironically fixing these bugs in the process) to handle negative
offsets meaning "from the end".

19 years agoMelchior FRANZ:
ehofman [Tue, 24 May 2005 08:13:09 +0000 (08:13 +0000)]
Melchior FRANZ:

Turn the material animation's <transparency> property into a group, with
members <alpha-prop>/<alpha>, <offset-prop>/<offset>, <factor-prop>/<factor>,
<min>, and <max>. The "material" animation can now fully replace "blend" and
"alpha-test" (--> <threshold>) animations, with enhanced possibilities:
The "material" animation can be used for one or more explicit objects (like
"blend"), but also for all objects that share one material (<global>), which
avoids problems with objects being forced together into one tree. Also, an
object doesn't have to be semitransparent or textured with a semitransparent
texture to make blending work. Unlike the "blend" animation, the "material"
animation also makes fully opaque and untextured objects transparent. (This
fixes the bo105's formerly semi-transparent rotor.)

Erik:
The blend animation and alpha-test animation are depreciated as of now.

19 years agoMelchior FRANZ:
ehofman [Mon, 23 May 2005 16:35:00 +0000 (16:35 +0000)]
Melchior FRANZ:

Currently, the material animation sets glColorMaterial(GL_AMBIENT_AND_DIFFUSE)
for all material properties. This breaks emission-only (e.g. cockpit lighting
for the p51d) or specular-only animation. ==> set glColorMaterial only where
it is really required.

19 years agoMSVC fix.
ehofman [Sun, 22 May 2005 09:18:56 +0000 (09:18 +0000)]
MSVC fix.

19 years agoHarald JOHSNEN:
ehofman [Sun, 22 May 2005 08:09:08 +0000 (08:09 +0000)]
Harald JOHSNEN:

Changes
=======

- correct the transparency probleme when old 3d clouds were enabled
 (rendering context with an alpha channel)
- changed rain cone orientation, it can now be viewed from helicopter or chase
  view (still not tower view)
- clouds are a bit more yellow/red at dawn/dusk
- weather data is now correctly propagated to the interpolator, this correct
  visibility, wind, etc
- the 'metar' weather scenario now immedialty reuse the real metar data
- real metar no more overwrite custom weather scenario

19 years agoMSVC fix.
ehofman [Sun, 22 May 2005 07:35:39 +0000 (07:35 +0000)]
MSVC fix.

19 years agoMake removeChild() work (again?)
ehofman [Tue, 17 May 2005 09:56:08 +0000 (09:56 +0000)]
Make removeChild() work (again?)

19 years agogcc fix.
ehofman [Sun, 15 May 2005 09:34:04 +0000 (09:34 +0000)]
gcc fix.

19 years agoHarald JOHNSEN:
ehofman [Sun, 15 May 2005 09:27:00 +0000 (09:27 +0000)]
Harald JOHNSEN:

This is another update for the cloud code, a lot of lines but this time I have started to add the doxygen doc.

Misc
====

- corrected a bug when RTT is not available, the current rendering context was
  altered
- if RTT is not available then 3d clouds are not drawn at all
- impostors lighting is now recomputed when the sun changes position
- distant objects are no more seen in front of clouds
- blending of distant clouds is a bit better now
- litle optimization of code (uses a less cpu time)
- use layer wind speed and direction (no more hardcoded wind)
- fov is no more hardcoded

Changes
=======

- clouds (cu only) are dissipating/reforming (experimental)
- compute a turbulence factor that depends on surrounding clouds and type of
  clouds (experimental)
- clouds shapes are defined in cloudlayers.xml
- type of clouds present in a layer is also defined in cloudlayers.xml
- cloud layers are generated from metar and other misc. data (in progress)
- added a rain effect around the viewer (enabled in the rendering dialog and
  when the metar property says so)
- added a lightning effect (enabled in the rendering dialog) : cb clouds spawn
  new lightnings
- added a dialog to select from different weather source : metar/property,
  a 'fair weather' environment and a 'thunderstorm' environment.

19 years agoMelchior: Only change types when explicitly requested.
ehofman [Mon, 9 May 2005 16:18:41 +0000 (16:18 +0000)]
Melchior: Only change types when explicitly requested.

19 years agoMelchior FRANZ:
ehofman [Mon, 9 May 2005 14:31:41 +0000 (14:31 +0000)]
Melchior FRANZ:

Vivian pointed out that a redefined Ctrl-U key binding didn't work
correctly. I found out that this is, because the definition in
$FG_ROOT/keyboard.xml sets <value type="bool"> for binding[1],
and ... [better sit down first!] ... and assigning <value type="double">
in a *-set.xml file doesn't *really* set "double" as new type!

Instead, the boolean is kept, and a double sqeezed into it. In other
words: once tainted as bool, you can throw all doubles in the universe
on a property node, and all it will accept is 0 and 1. Without warning!

BTW: I changed the patch: I was overly cautious: clear_value() does already
care for ties and for setting NONE, so we just need to make that public as
clearValue(), and use that. Makes the patch a bit more verbose, though.  :-/

19 years agoSolaris fix.
ehofman [Sat, 7 May 2005 08:46:04 +0000 (08:46 +0000)]
Solaris fix.

19 years agoProperly release the mod lock when returning from a runtime error.
andy [Wed, 4 May 2005 20:17:28 +0000 (20:17 +0000)]
Properly release the mod lock when returning from a runtime error.
Ampere discovered that the interpreter would deadlock at runtime if it
hit such a condition during initialization.

19 years agoPhil Cazzola:
ehofman [Sun, 1 May 2005 08:50:39 +0000 (08:50 +0000)]
Phil Cazzola:

This is a minor bug fix for sgBucketDiff().
If you crossed the bucket size boundary, the answer for dx could be wrong.

E.g.
 going from   0:0, 21:7  to 0:7, 21:7   would give you dx = 7 (correct)
 but going from 0:0, 21:7 to 0:3, 22:0 would give you dx = 6 (instead of 7)

Previously it differenced the center longitudes of the buckets.  When you
cross a boundary, the center point of the larger bucket now lies on the edge of the smaller bucket.

The result was a dx with an integer + 1/2 bucket, which rint() was rounding to the nearest even int.

This function only seems to be used in TerraGear.

19 years agoMake use of the repeatable sg_random() function so display systems can synchronize...
ehofman [Sat, 30 Apr 2005 10:00:16 +0000 (10:00 +0000)]
Make use of the repeatable sg_random() function so display systems can synchronize 3d clouds too.

19 years agoAdd a seed function that gives the same random seed within a ten minute period of...
ehofman [Sat, 30 Apr 2005 09:59:12 +0000 (09:59 +0000)]
Add a seed function that gives the same random seed within a ten minute period of time. This should be useful for synchronizing display systems.

19 years agoMathias:
ehofman [Fri, 29 Apr 2005 14:37:27 +0000 (14:37 +0000)]
Mathias:

I have done a patch to eliminate the jitter of 3D-objects near the viewpoint
(for example 3D cockpit objects).
The problem is the roundoff accuracy of the float values used in the
scenegraph together with the transforms of the eyepoint relative to the
scenery center.

The solution will be to move the scenery center near the view point.
This way floats relative accuracy is enough to show a stable picture.

To get that right I have introduced a transform node for the scenegraph which
is responsible for that shift and uses double values as long as possible.
The scenery subsystem now has a list of all those transforms required to place
objects in the world and will tell all those transforms that the scenery
center has changed when the set_scenery_center() of the scenery subsystem is
called.
The problem was not solvable by SGModelPlacement and SGLocation, since not all
objects, especially the scenery, are placed using these classes.

The first approach was to have the scenery center exactly at the eyepoint.
This works well for the cockpit.
But then the ground jitters a bit below the aircraft. With our default views
you can't see that, but that F-18 has a camera view below the left engine
intake with the nose gear and the ground in its field of view, here I could
see that.
Having the scenery center constant will still have this roundoff problems, but
like it is now too, the roundoff error here is exactly the same in each
frame, so you will not notice any jitter.

The real solution is now to keep the scenery center constant as long as it is
in a ball of 30m radius around the view point. If the scenery center is
outside this ball, just put it at the view point.

As a sideeffect of now beeing able to switch the scenery center in the whole
scenegraph with one function call, I was able to remove a one half of a
problem when switching views, where the scenery center was far off for one or
two frames past switching from one view to the next. Also included is a fix
to the other half of this problem, where the view position was not yet copied
into a view when it is switched (at least under glut). This was responsible
for the 'Error: ...' messages of the cloud subsystem when views were
switched.

19 years agoMathias:
ehofman [Fri, 29 Apr 2005 14:36:50 +0000 (14:36 +0000)]
Mathias:

 have done a patch to eliminate the jitter of 3D-objects near the viewpoint
(for example 3D cockpit objects).
The problem is the roundoff accuracy of the float values used in the
scenegraph together with the transforms of the eyepoint relative to the
scenery center.

The solution will be to move the scenery center near the view point.
This way floats relative accuracy is enough to show a stable picture.

To get that right I have introduced a transform node for the scenegraph which
is responsible for that shift and uses double values as long as possible.
The scenery subsystem now has a list of all those transforms required to place
objects in the world and will tell all those transforms that the scenery
center has changed when the set_scenery_center() of the scenery subsystem is
called.
The problem was not solvable by SGModelPlacement and SGLocation, since not all
objects, especially the scenery, are placed using these classes.

The first approach was to have the scenery center exactly at the eyepoint.
This works well for the cockpit.
But then the ground jitters a bit below the aircraft. With our default views
you can't see that, but that F-18 has a camera view below the left engine
intake with the nose gear and the ground in its field of view, here I could
see that.
Having the scenery center constant will still have this roundoff problems, but
like it is now too, the roundoff error here is exactly the same in each
frame, so you will not notice any jitter.

The real solution is now to keep the scenery center constant as long as it is
in a ball of 30m radius around the view point. If the scenery center is
outside this ball, just put it at the view point.

As a sideeffect of now beeing able to switch the scenery center in the whole
scenegraph with one function call, I was able to remove a one half of a
problem when switching views, where the scenery center was far off for one or
two frames past switching from one view to the next. Also included is a fix
to the other half of this problem, where the view position was not yet copied
into a view when it is switched (at least under glut). This was responsible
for the 'Error: ...' messages of the cloud subsystem when views were
switched.

19 years agoHarald Johnsen: Fix a 'terrible' bug with culling of the clouds.
ehofman [Tue, 26 Apr 2005 20:14:37 +0000 (20:14 +0000)]
Harald Johnsen: Fix a 'terrible' bug with culling of the clouds.

19 years agoIRIX fixes.
ehofman [Tue, 26 Apr 2005 09:08:58 +0000 (09:08 +0000)]
IRIX fixes.

19 years agoHarald Johnson:
ehofman [Tue, 26 Apr 2005 08:30:38 +0000 (08:30 +0000)]
Harald Johnson:

Changes
=======

- corrected some strange behavior when playing with the render dialog options
- the density slider is now working : if you are fps limited and still want to see clouds in
  the distance you should play with that
- added the choice for texture resolution, its more comprehensible now (before it was
  wrongly allways choosing 64x64 textures)
- changed the initial texture size : you now have 64 texture of 64x64, this uses 1Mo of
  texture memory (before it was 20 texture of  256x256, that took more memory and there was
  not enought impostors)
- sun vector is now right so the lighting is a bit better
- removed useless sort and light computations for impostors, this should save a lot of cpu
- blending of distant cloud is more accurate now
- clouds are now positioned correctly, they don't try to escape you anymore
- no more red/white boxes around cloud
- textures are now filtered (no more big pixels)

known bugs
==========

- distant objects are seen in front of clouds

19 years agoDon't refference GLUT but GLU instead.
ehofman [Sun, 24 Apr 2005 13:55:20 +0000 (13:55 +0000)]
Don't refference GLUT but GLU instead.

19 years agoThis one time I did a commit using Linux. <sigh>
ehofman [Sun, 24 Apr 2005 11:45:34 +0000 (11:45 +0000)]
This one time I did a commit using Linux. <sigh>

19 years agoHarald Johnson:
ehofman [Sun, 24 Apr 2005 11:16:50 +0000 (11:16 +0000)]
Harald Johnson:

- new and updated sources for the new volumetric clouds
- 2 new textures for the clouds
- an update to the render dialog to enable/disable and change a few parameters
  for the new clouds

19 years agoSupport for a "forindex(idx; list) {...}" construct analagous to
andy [Fri, 22 Apr 2005 21:54:16 +0000 (21:54 +0000)]
Support for a "forindex(idx; list) {...}" construct analagous to
foreach, except that the variable gets the index instead of the list
element.  Should be useful, and took almost no code to implement.

Support for operator/assignment syntax: +=, -=, *=, /= and ~= now do
what you think they should.

Library support for a bind() function (see the docs Andy is still
writing), allowing runtime modifications to function lexical
environments.

19 years agoFix clamping of the minimum hash size, because the Melchior discovered
andy [Tue, 19 Apr 2005 14:19:46 +0000 (14:19 +0000)]
Fix clamping of the minimum hash size, because the Melchior discovered
  that the column math goes wacky when lgalloced is allowed to be
  zero.
Augment the find() function to take a starting index.
Fix strc() to use a default index of zero.
Fix parser precedence of TOK_MINUS, so that "a-b-1" means (a-b)-1 and
  not a-(b-1).

19 years agoNon gcc fixes.
ehofman [Tue, 19 Apr 2005 12:30:12 +0000 (12:30 +0000)]
Non gcc fixes.

19 years agoFix crash in the code generator when compiling a (now illegal, because
andy [Mon, 18 Apr 2005 20:43:29 +0000 (20:43 +0000)]
Fix crash in the code generator when compiling a (now illegal, because
"var" is a reserved word) expresssion of the vorm "var=<expr>".

19 years agoUpgrade to nasal 1.0 test candidate
andy [Mon, 18 Apr 2005 19:48:47 +0000 (19:48 +0000)]
Upgrade to nasal 1.0 test candidate

19 years agoFix boolean semantics so that the empty string evaluates to false, and
andy [Wed, 30 Mar 2005 18:45:01 +0000 (18:45 +0000)]
Fix boolean semantics so that the empty string evaluates to false, and
numeric strings are false if their numeric values are false.

19 years agoMelchior FRANZ:
ehofman [Mon, 28 Mar 2005 09:13:45 +0000 (09:13 +0000)]
Melchior FRANZ:

Re-organisation: <diffuse>, <ambient>, <emission>, <specular> are
now groups with members <red>, <green>, <blue>, <factor>, <offset>,
and their <*-prop> forms. Additionally, there's an option <property-base>
that can be used to set a path that is prepended to all <*-prop> paths.
It defaults to an empty string. Rationale: see model-howto.html.

19 years agoDon't parse a single "e" or "E" as a numerical zero. You need a
andy [Tue, 22 Mar 2005 20:28:47 +0000 (20:28 +0000)]
Don't parse a single "e" or "E" as a numerical zero.  You need a
numerical prefix to use the 1.0e12 notation, "e" alone is not enough.

19 years agoMelchior FRANZ:
ehofman [Tue, 22 Mar 2005 13:12:51 +0000 (13:12 +0000)]
Melchior FRANZ:

here is the promised material animation. It looks a bit longish, but that
wasn't avoidable -- there are simply too many parameters to consider. I tried
hard, though, to make the animation fast by only doing the necessary stuff.
It doesn't affect the frame rate here with my test model. The animation is
heavily based on Jim's "material-emission" animation.

* implementation of the "material" animation (this required to make the
  texture path available) + documentation update ($FG_ROOT/Docs/)
* fix some more return values (texture animations, and select) for the
  shadow problem (and some in anticipation of other problems  :-)
* fix compiler warning

19 years agoMelchior FRANZ:
ehofman [Sat, 19 Mar 2005 10:19:30 +0000 (10:19 +0000)]
Melchior FRANZ:

the cause for the disappearing shadows is, that SimGear doesn't tell plib
to call the pre-traversal-callback function on culled objects. These calls,
however, are necessary to execute the transform animation that does, for
example, translate a shadow back into the frustum! Curretnly, the callback
is only executed, and the shadow only magically pops up again, when the object
enters the frustum because the view has changed significantly.

The plib documentation does only talk about TRUE and FALSE for possible
return values from the pre-traversal-callback. But src/ssgEntity.cxx reads
like this:

   int ssgEntity::preTravTests ( int *test_needed, int which )
   ...
       int result = (*preTravCB)(this,which) ;

       if ( result == 0 ) return FALSE ;
       if ( result == 2 ) *test_needed = 0 ;
   ...

So the return value needs to be 2 to bypass the cull test for pretraversal,
and get the pretraversal in any case. I only changed the return values in
four animations: scale, rotate, translate, and range, because these are
the most likely to move an object out of the frustum. It's not necessary
for blend/alpha/texture manipulation etc. Of course, this is a bit more work
for plib, but the performance will probably not be affected, because:

* these four animations are mainly used for the aircraft model (the spin
  and billboard (trees!) animations are not affected)

* the number of extra nodes to process is quite low

* a part of the time spent for the extra nodes to be processed, was before
  used for workarounds that are now not necessary any more

I didn't observe a frame rate drop, at least.

19 years agoOops, fixed the wrong test
andy [Sat, 12 Mar 2005 15:51:37 +0000 (15:51 +0000)]
Oops, fixed the wrong test

19 years agoOff by one error when printing exact poweres of ten
andy [Sat, 12 Mar 2005 15:49:53 +0000 (15:49 +0000)]
Off by one error when printing exact poweres of ten

19 years agoFix an infinite loop (due to an overflow condition) when printing some
andy [Fri, 11 Mar 2005 21:49:31 +0000 (21:49 +0000)]
Fix an infinite loop (due to an overflow condition) when printing some
very large numbers.

19 years agoFix the fixes. Note that "." had the same problem as "+" and "-", and
andy [Fri, 11 Mar 2005 20:39:07 +0000 (20:39 +0000)]
Fix the fixes.  Note that "." had the same problem as "+" and "-", and
that we can still match non-identical constants if they are both
strings with the same numerical value.

19 years agoDon't parse the strings "+" and "-" as numerical zeros. Also fix the
andy [Fri, 11 Mar 2005 19:07:06 +0000 (19:07 +0000)]
Don't parse the strings "+" and "-" as numerical zeros.  Also fix the
code generation of constant objects to use real identity and not Nasal
equality, so (e.g.) the constants 1 (number) and "1.0" (string) do not
get turned into the same object in the generated code.

19 years agoIma Sudonim:
ehofman [Thu, 10 Mar 2005 08:58:48 +0000 (08:58 +0000)]
Ima Sudonim:

I have (hopefully) generated a patch for a previously mentioned simgear  problem for a hang condition in mac os x.  Mentioned in  <http://baron.flightgear.org/pipermail/flightgear-devel/2005-February/ 035004.html>

19 years agoautomake 1.8+ fixes
ehofman [Tue, 15 Feb 2005 18:13:15 +0000 (18:13 +0000)]
automake 1.8+ fixes

19 years agoMore MacOS X fixes
ehofman [Sat, 12 Feb 2005 12:44:46 +0000 (12:44 +0000)]
More MacOS X fixes

19 years agoFixes from Norman for users running Cugwin with the XServer package installed.
ehofman [Fri, 11 Feb 2005 15:19:04 +0000 (15:19 +0000)]
Fixes from Norman for users running Cugwin with the XServer package installed.

19 years agoMacOS X fix(?)
ehofman [Fri, 11 Feb 2005 15:07:22 +0000 (15:07 +0000)]
MacOS X fix(?)

19 years agoComment out GLX code for MacOS and (hopefully) add some MacOS AGL compattible code...
ehofman [Tue, 1 Feb 2005 10:35:43 +0000 (10:35 +0000)]
Comment out GLX code for MacOS and (hopefully) add some MacOS AGL compattible code. More needs to be done though.

19 years agoMacOS doesn't have glx.h
ehofman [Mon, 31 Jan 2005 18:29:38 +0000 (18:29 +0000)]
MacOS doesn't have glx.h

19 years agoJim Wilson:
ehofman [Mon, 31 Jan 2005 18:21:12 +0000 (18:21 +0000)]
Jim Wilson:

Fix a couple of loose ends and missed edits on the earlier patch.  For the
most part no change in functionality.

19 years agoCygwin fixes
ehofman [Mon, 31 Jan 2005 18:07:40 +0000 (18:07 +0000)]
Cygwin fixes

19 years agoWindows fixes.
ehofman [Sat, 29 Jan 2005 11:44:01 +0000 (11:44 +0000)]
Windows fixes.

19 years agoJim Wilson:
ehofman [Sat, 29 Jan 2005 10:31:25 +0000 (10:31 +0000)]
Jim Wilson:

This patch adds support to the model animation system for modifying emissive
states on the fly so that it is possible to make "lights" appear to dimm.

This is an example of a configuration entry which should explain how it is used:

 <animation>
  <type>material-emission</type>
  <object-name>Face</object-name>
  <property>/controls/lighting/instruments-norm</property>
  <emiss-red>1.0</emiss-red>
  <emiss-green>0.8</emiss-green>
  <emiss-blue>0.5</emiss-blue>
 </animation>

Note the color entries are the emissive colors when the "property" value is
1.0.  They are useful for tinting the light.   The "property" itself must be
float or double and is clamped to values between 0 ~ 1.0 inclusively.   The
"property" value is multiplied against the colors to get the actual material
properties.  Thus property value 0.0 = darkest, and 1.0 = brightest.

19 years agoMSVC fix.
ehofman [Fri, 28 Jan 2005 15:23:26 +0000 (15:23 +0000)]
MSVC fix.

19 years agoFrederic Bouvier:
ehofman [Fri, 28 Jan 2005 15:21:29 +0000 (15:21 +0000)]
Frederic Bouvier:

code.c is C code ( according to the file extension ), so variables should be declared at the beginning of the function.

19 years agouse a proper delete[]
ehofman [Fri, 28 Jan 2005 15:15:23 +0000 (15:15 +0000)]
use a proper delete[]

19 years agoMSVC fixes
ehofman [Fri, 28 Jan 2005 09:32:57 +0000 (09:32 +0000)]
MSVC fixes

19 years agoFix an NVIDIA problem.
ehofman [Thu, 27 Jan 2005 17:49:22 +0000 (17:49 +0000)]
Fix an NVIDIA problem.

19 years agoAdd a RenderTexture test program.
ehofman [Thu, 27 Jan 2005 10:56:22 +0000 (10:56 +0000)]
Add a RenderTexture test program.

19 years agoMelchior FRANZ:
ehofman [Thu, 27 Jan 2005 10:47:09 +0000 (10:47 +0000)]
Melchior FRANZ:

If alcOpenDevice( NULL ) is NULL, then context is never assigned a
value, and it's pointless to ask for it in the next "if". But as the
ALCcontext that context points to doesn't seem to be fully defined
(OpenAL bug), valgrind still complains ...

Erik Hofman:
Extend this some further and define context=0 otherwise and check for
context != 0 before using it.

19 years agoMelchior FRANZ:
ehofman [Thu, 27 Jan 2005 10:42:31 +0000 (10:42 +0000)]
Melchior FRANZ:

Trying to find the bug in tower.cxx (that crashes fgfs quite frequently
for me!), I'm playing with valgrind again. Until I'm in the ATC subsystem
there will be some other bugs and nitpicking along the way.

valgrind doesn't like that imgage->tmp is once allocated with new and
once with new[], sometimes with malloc() (via map), and sometimes freed
with delete (not delete[]!) and sometimes with free(). With simple types
such as GLubyte this shouldn't really make a difference, but anyway.

Also, I promised that I'd send patches for "if (foo) delete foo;" as
I'm making other changes to concerned files. texture.cxx is one with a
few occurrences thereof. (Remember: C++ explicitly allows to delete
null-pointers, so this check is redundant, and hence not tolerated in
other projects, such as KDE. Doesn't have to impress us, of course.  :-)

Also, fixes 4 signed/unsigned warnings (gcc 3.3.4)

19 years agoAdd Mark Haris' RenderTexture class based on SimGear's extesion support files.
ehofman [Thu, 27 Jan 2005 10:39:15 +0000 (10:39 +0000)]
Add Mark Haris' RenderTexture class based on SimGear's extesion support files.

19 years agoMove error handling in setupFuncall above the stack frame creation.
andy [Tue, 25 Jan 2005 22:37:22 +0000 (22:37 +0000)]
Move error handling in setupFuncall above the stack frame creation.
The error properly belongs to the enclosing scope, not the called
(non-)function.  This bug was fixed a few months back in my private
tree, but Melchior just discovered that the new Concorde scripts
tickle it.  I really need to re-synchronize SimGear with my own Nasal
tree...

19 years agoAdd a bunch of extensions in preparation of render-to-texture support.
ehofman [Tue, 25 Jan 2005 18:33:59 +0000 (18:33 +0000)]
Add a bunch of extensions in preparation of render-to-texture support.

19 years agoFrederic Bouvier:
curt [Mon, 24 Jan 2005 21:46:12 +0000 (21:46 +0000)]
Frederic Bouvier:

The Beaver triggered a problem ( uninitialized variable ). Here is the updated
code.

19 years agoFrederic Bouvier:
curt [Mon, 24 Jan 2005 19:49:35 +0000 (19:49 +0000)]
Frederic Bouvier:

this is the animation code that do randomisation of the spin animation. The XML tags are modified to support the syntax below :

  <use-personality type="bool">true</use-personality>
  <factor>
    <random>
      <min>1.8</min>
      <max>2.2</max>
    </random>
  </factor>
  <starting-pos-deg>
    <random>
      <min>0</min>
      <max>360</max>
    </random>
  </starting-pos-deg>

instead of usual :

  <factor>1.42</factor>
  <starting-deg-pos>42.0</starting-deg-pos>

19 years agoErik Hofman
ehofman [Mon, 24 Jan 2005 15:51:37 +0000 (15:51 +0000)]
Erik Hofman

1. Remove the dependency on alut  which (on certein platforms) might pose
   some restrictuons on commercial use.

2. Create a sound source just prior to playing the sound and destroy it
   again when the sound has stopped. This should greatly reduce the
   error reports from Windows users.

19 years agoMelchior FRANZ:
ehofman [Thu, 20 Jan 2005 09:28:04 +0000 (09:28 +0000)]
Melchior FRANZ:

The following patches to SimGear & FlightGear ...

- create an FGMetar abstraction layer, whose purpose is:
  * provide defaults for unset values
  * interpolate/randomize data (GREATER_THAN)
  * derive additional values (time, age, snow cover)
  * consider minimum identifier (CAVOK, mil. color codes)
- add rain/hail/snow/snowcover support on the METAR side
- add max age of METAR data handling (currently set to
- add support for an external METAR cache proxy server
- add CAVOK handling
- set missing year/month in regular METAR messages
- fix a small bug in metar.cxx (wrong return value)

19 years agoReady for 0.3.8 release.
curt [Tue, 18 Jan 2005 14:34:13 +0000 (14:34 +0000)]
Ready for 0.3.8 release.

19 years agoRequire plib-1.8.4
curt [Mon, 17 Jan 2005 21:48:05 +0000 (21:48 +0000)]
Require plib-1.8.4

19 years agoUse the double precission pow() function to get Solaris compiling.
ehofman [Sun, 16 Jan 2005 08:52:22 +0000 (08:52 +0000)]
Use the double precission pow() function to get Solaris compiling.

19 years agoSolaris fix
ehofman [Sat, 15 Jan 2005 14:24:28 +0000 (14:24 +0000)]
Solaris fix

19 years agoSolaris fix.
ehofman [Sat, 15 Jan 2005 14:22:56 +0000 (14:22 +0000)]
Solaris fix.