ehofman [Sat, 12 Nov 2005 10:26:21 +0000 (10:26 +0000)]
Make a clear separation between loading a sound file into main memroy and sending it to the driver. This prevents data to be loaded into the main memory (or onto the soundcard's memory) when it's not needed.
andy [Wed, 9 Nov 2005 20:34:14 +0000 (20:34 +0000)]
Architectural fix allowing the "tip" popups (FOV, view name, etc...)
to pop themselves down while the simulator is paused.
The problem was with the "real time" queue in the event manager,
causing the third argument of Nasal's settimer() (a flag for "sim
time") to be ignored. Inverts the default sense of the argument, as
there are lots of uses of settimer() in the current code, almost none
of which want to use real time.
Note this fix introduces a header file incompatibility in SimGear --
be sure to update.
ehofman [Wed, 26 Oct 2005 11:19:58 +0000 (11:19 +0000)]
Back out the shared mutex code since it only works when the mutex is in shared
memory[1], something we don't support anyhow.
This also fixes a FreeBSD compile problem.
ehofman [Tue, 25 Oct 2005 13:48:58 +0000 (13:48 +0000)]
Alex Romosan:
* Use "const string&" rather than "string" in function calls when appropriate.
* Use "const Point3D&" instead of "Pint3D" in function calls when appropriate.
* Improved course calculation in calc_gc_course_dist()
* Safer thread handling code.
Vassilii Khachaturov:
Dont use "const Point3D&" for return types unless you're absolutely sure.
Erik Hofman:
* Use SGD_(2)PI(_[24]) as defined in simgear/constants.h rather than
calculating it by hand every time.
ehofman [Sun, 23 Oct 2005 11:55:48 +0000 (11:55 +0000)]
Melchior FRANZ:
The attached patch makes remove_child() available as removeChild(pos, keep).
That's consistent with getChild. Only renamed remove_child to removeChild and
added a check for validity of the pos argument.
removeChildren() will be used in input.cxx, and a lot in the upcoming
dynamic new_gui dialogs, which are aiming at replacing the hard-coded
dialogs. I'll discuss them on the list once the infrastructure is
in place. (The <hide> gui property was one part of it.)
ehofman [Fri, 14 Oct 2005 16:27:06 +0000 (16:27 +0000)]
Mathias Fröhlich:
This one, removes some virtual qualifiers at a private member class of
SGPropertyNode. These virtual qualifiers are really useless and stop the
compiler from inlineing these functions. I gain a single frame with my
favourite aircraft per second!
Correct the bug in the translate animation where the offset was part of the
multiplication. It now behaves like all other animations:
out = (prop * factor) + offset
I feel strongly that the existing is wrong and must be corrected - it is non-op
if the offset is zero as I have found to my cost! It is just a typo I expect.
The diff also provides non-op default values for the scale animation.
I've also included Harald's latest eye-candy animation which allows us to
have a very smart heat-haze for exhausts. They have been tested by me and
others on Linux and Cygwin. You might like to upload these - I have a
revised Hunter ready to go as soon as they are uploaded.
andy [Tue, 20 Sep 2005 21:09:34 +0000 (21:09 +0000)]
Sneak a Nasal update in before the next release. This version
*appears* to work correctly on all systems to which I have access
(i386 linux/win32, x86_64 linux, powerpc OS X, Sparc Solaris 10), but
not all systems are capable of running fgfs. Beyond that, multiple
threading bugs were fixed, and the naCall() API changed slightly to
support named function arguments.
NOTE: this introduces a change in the external API, and therefore this
change *must* be compiled against current FlightGear code.
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.
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 ...
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.
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...
- 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.
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.
- 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.
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
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.
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.
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.
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.
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
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".
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.