frohlich [Sun, 11 Jun 2006 13:30:59 +0000 (13:30 +0000)]
Modified Files:
simgear/scene/material/mat.cxx simgear/scene/material/mat.hxx
simgear/scene/material/matlib.cxx
simgear/scene/material/matlib.hxx simgear/scene/tgdb/leaf.cxx
simgear/scene/tgdb/obj.cxx
Attach userdata to groundtile scenegraph leafs that contains
a SGMaterial reference to the material of that leaf.
Add (physical) material properties to the material definitions.
Plug a memory leak with GlyphSigns.
mfranz [Mon, 8 May 2006 11:31:16 +0000 (11:31 +0000)]
add optional position argument to SGRoute::add_waypoint(). Default is -1,
which appends the WP like it used to. Valid vector indices insert the WP
at this position.
thanks to Erik's texture map I can now drop empty.rgb altogether and just
specify the same texture in the "foo.lighted" and "foo.unlighted" material
entry. This also allows to drop the state cloning and thereby solves the
most urgent apt_signs.cxx TODO. :-)
- don't use hard-coded emission values for unlighted signs, but load both
states from material.xml (separate <material> entries for now)
- clone state less often: not once per sign element, but once per material
switch (TODO: clone only once per material)
fix "unknown.rgb" path (the wrong path was the reason why we always only
got plib's lowres red-white chequer-board pattern along with an error
message, and not ours ... which is much prettier, but also bigger.
(Should we downscale it?)
rename OBJECT_TAXI_SIGN to OBJECT_SIGN. This isn't about taxi signs any
more, but all sorts of signs. Now is the best time to get rid of a
misleading name.
re-add hard-coded vertical distance. The coordinates should be surface
points and not add this distance, which depends on the sign housing/hardware,
after all.
- commands do now have to start with @
- add commands @size, @material, @light
- make "BlackSign" texture default
- make @B, @R, @L, @Y open close their frames automatically (this can be
avoided by setting the @material manually)
- add number variants for those 4 sign commands: @Y2, @B5, etc (according
to the spec; defaulting to the respective biggest panel size, i.e. @B = @B3)
(detailed description will be added to $FG_ROOT/Docs/)
remove obsolete files (on request by Christian Mayer, who has introduced them):
- they are not used anywhere in sg/fgfs
- and are very clearly *not* GPL compatible!
andy [Mon, 10 Apr 2006 16:21:17 +0000 (16:21 +0000)]
Manabu Nishiyama (non-FlightGear Nasal user) discovered an
uninitialized data bug in naHash_cget(). When the hashcode field of
naStr was introduced, I forgot to set it in this function, which
creates a temporary naStr on the stack.
support for font textures. They are normal (but rather lenghty) <material>,
but contain <glyph> entries with <name>, <left> and <right>. The latter two
describe where in the texture a letter or symbol begins and where it ends.
(range 0-1). <xscale> defines a horizontal scaling factor.
mfranz [Thu, 30 Mar 2006 14:13:22 +0000 (14:13 +0000)]
protect ssg pointers to avoid occasional crashes (of course it would be
nicer if the Occluder would always get removed before its model branch,
but that's not easily enforcable)
mfranz [Sun, 26 Mar 2006 08:22:26 +0000 (08:22 +0000)]
If the author of this message isn't alerted enough to *fix* this, then I'm
sure the users won't do that either. This is regularly triggerd and leads
to meaningless error reports.
"* minor redundant gl call in DrawCone2 optimized away (twice per frame)
* corrected the glRotatef() order in drawRain even further (a less
obvious mistake than before, which is noticed by looking skywards and wiggling
the mouse in the view direction change mode)
* all the "magic numbers" used in the rain rendering code have been
provided a default (based on the old hardcoded value) in a form of a
define, and a meaningfully named static member in SGEnviro"
andy [Tue, 21 Mar 2006 22:22:47 +0000 (22:22 +0000)]
The original code (rather oddly) interprets a length of zero in
subvec() to mean "the whole vector". Melchior showed a use case
(removal of the first element from a vector) where getting a
zero-length subvector is actually desired. And since I can't come up
with a good reason for why the "feature" was there in the first place,
out it goes...
andy [Tue, 21 Mar 2006 21:57:00 +0000 (21:57 +0000)]
Melchior discovered that cmp() was just wrong, failing to actually
inspect the string pointers. It also failed to properly sort strings
where one is a prefix of the other. It looks to me like I just never
finished this, and it ended up in CVS because it just happened to
compile...
mfranz [Tue, 14 Mar 2006 10:38:06 +0000 (10:38 +0000)]
prevent animations from losing nodes, because other processes removed them
(We are currently getting a lot of aborts in the condition code when
running MP. I don't expect this to fix it, but a bug is a bug.)
ehofman [Thu, 9 Mar 2006 09:54:43 +0000 (09:54 +0000)]
Alexander Powell:
Add MAC OS X Render Texture support:
Most texture modes seem to work on my Powerbook, but I don't have a wide array
of machines to test it on otherwise.
If you have problems, please let me know and I'll see if I can help track down
the source of the bug. I'd love to keep working on it if time permits (I use
RenderTexture in a few other projects), so I'll keep you informed if there are
any changes that I make for the better.
mfranz [Thu, 9 Mar 2006 09:03:57 +0000 (09:03 +0000)]
model.[ch]xx:
add abstract class SGModelData. If a pointer to such a class is handed over
to sgLoad3DModel, then its modelLoaded() method is called with path, property
node and branch. And then it's added to the scene graph so that it's
destroyed when the model branch is removed from the graph.
modellib.[ch]xx:
only cache objects when asked to. This is the case for OBJECT_SHARED
and random objects (like before), but no longer for OBJECT_STATIC.
These are now removed from the graph when they are "out of sight". This
prevents accumulation of static models, and makes destroying model data
possible (e.g. removing Nasal modules)
matmodel.cxx:
set cache flag for random objects (same behavior as before)
fredb [Tue, 21 Feb 2006 12:59:31 +0000 (12:59 +0000)]
Melchior FRANZ:
- don't unlock an already unlocked mutex (Someone wanted to be on
the safe side with this, but the result is undefined and makes
pthread_mutex_destroy fail. Reference: manpage for
pthread_mutexattr_gettype/The Open Group[1]: "Attempting to
unlock a mutex of this type which is not locked results in
undefined behaviour.")
- re-enabled all subsystem destructors again (this has been disabled
because fgfs hung on exit, due to the mutex destroy failure from
above.)
ehofman [Tue, 21 Feb 2006 09:40:12 +0000 (09:40 +0000)]
Melchior FRANZ:
- new FSF address
- removed a few hundred trailing spaces
- fixed a few $Id$ lines
- copied two license headers from *.hxx files to their respective
*.cxx counterparts
- added two test aps to .cvsignore
- don't unlock an already unlocked mutex (Someone wanted to be on
the safe side with this, but the result is undefined and makes
pthread_mutex_destroy fail. Reference: manpage for
pthread_mutexattr_gettype/The Open Group[1]: "Attempting to
unlock a mutex of this type which is not locked results in
undefined behaviour.")
- re-enabled all subsystem destructors again (this has been disabled
because fgfs hung on exit, due to the mutex destroy failure)
ehofman [Sun, 19 Feb 2006 17:22:17 +0000 (17:22 +0000)]
Mathias Fröhlich:
This patch makes use of the vectors now available in simgear with that past
patch. And using that it simplyfies the carrier code somehow.
- Small additional factory's to the quaternion code are done in the simgear
part. Also more explicit unit names in the factory functions.
- The flightgear part makes use of them and simplyfies some computations
especially in the carrier code.
- The data part fixes the coordinate frames I used for the park positions in
the carrier to match the usual ones. I believed that I had done so, but it
was definitly different. Also there are more parking positions avaliable now.
ehofman [Sun, 19 Feb 2006 17:13:37 +0000 (17:13 +0000)]
Melchior FRANZ:
- change SG back to FG (this was accidently changed in three wrong
places when I prepared the file for SG)
- correct length for the proxy id detection
- set (guessed) deposit depth < 1mm correctly
- set deposit type string
- formatting
ehofman [Fri, 17 Feb 2006 09:23:40 +0000 (09:23 +0000)]
Melchior FRANZ:
This patch fixes the sound of 737, Concorde and others, if fgfs
was compiled with newer gcc versions (e.g. gcc 4.0.2). These compilers
implement the c++ standard more strictly, and thus don't guarantee
that c-style casted pointers to different data types really point
to the same address. This is only guaranteed for union members.
ehofman [Fri, 17 Feb 2006 09:22:04 +0000 (09:22 +0000)]
Mathias Fröhlich:
The patch adds a vector lib I have put together during the last time,
it is just handy and interfaces well with s(s)g*. Together with some small
modifications this will later also interface well with OpenSceneGraphs
vectors/matrices. Using this vector kernel is targeted to have a handy
matrix/vector lib available and to provide a scenegraph independent vector
type for use with a small scenegraph wrapper aimed for a smooth transition to
openscenegraph.
That vector code also includes an improoved geodetic conversion routine I
have found some time ago published in the 'journal of geodesy' which avoids
iterative computations for that purpose.
Also the geodetic position class is more typesafe and unitsafe than the
Point3D currently is.
That part is relatively old and in use in my local trees for several months
now.
ehofman [Fri, 17 Feb 2006 08:58:56 +0000 (08:58 +0000)]
Olaf Flebbe:
This patch makesFlightGear at least compile on MSVC. I hope I have removed
reference of my other local changes. DSP and DSW files are included for
reference. They have been reconstructed with am2dsp.pl. I had to introduce a
change to am2dsp because of the need of filenames with embedded spaces. (Yuck)
The major direction is to remove clutter like the _USE_MATH_DEFINES and
have it on the compiler command line sice there is no central include
file. You will have to put it on the command line for your locale
Project files, if it not there, already. I added the
_CRT_SECURE_NO_DEPRECATE define for 2005, since it does no harm to other
VC version.
Third Party Libs like plib, OpenALSDK, freeglut, pthreads-win32, zlib
are unpacked as is side by side. Only change put the includes of OpenAL
into include/AL rather directly into include.
ehofman [Thu, 2 Feb 2006 09:56:48 +0000 (09:56 +0000)]
Vassilii Khachaturov:
Fix the current buggy rain orientation behaviour for the views attached to the
aircraft (while still inheriting bugs with the views attached to anything else).
ehofman [Mon, 30 Jan 2006 10:56:34 +0000 (10:56 +0000)]
Melchior FRANZ:
add optional arg to SGPropertyNode::addChangeListener that triggers
the listener function call initially. This is useful for cases where
a freshly installed listener wants to treat the current property
value as changed from 'unknown' to the actual value right away.
Examples can be found in the Nasal incarnation setlistener(),
where we have for example this (in $FG_ROOT/Nasal/gui.nas):
That is: we first attach a listener that cares for changes to the FPS
display switch, but then we have to manually open the dialog initially.
That's a duplication of code and could be as simple as this
(INIT part only):
That is: the optional third arg makes fpsDisplay be called initially,
and then again with every write action. My first solution was in the
Nasal code only, but Andy (rightfully) says that this should rather
be in sg.