mfranz [Thu, 24 Aug 2006 23:03:52 +0000 (23:03 +0000)]
compile (gcc 4.1.0)
("In member function 'T SGPersonalityParameter<T>::shuffle()':
28: error: there are no arguments to 'sg_random' that depend on a template
parameter, so a declaration of 'sg_random' must be available")
andy [Mon, 3 Jul 2006 05:13:27 +0000 (05:13 +0000)]
Been hacking at Nasal recently:
Fix bug with break/continue inside of a foreach or forindex: Don't pop
the vector/index inside OP_EACH, do it at the end of the loop.
In the process, discovered and fixed a scary corruption issue with
continue; it never really worked right, although simple usage was
likely to get away without crashing. Both the continue's OP_BREAK and
the cleanup code at the end of a loop would pop the "mark" stack,
leading to an underflow. Introduced an OP_CONTINUE which adjusts
stack but doesn't change markTop
Re-inline the PUSH macro. This thing is called all over the place
from the inner loop. If the problem is intra-expression side effects,
then just use another expression in the macro.
Return an empty vector when requesting zero-length subvec, not nil
Have call() return the call stack in the error vector; see docs on
plausible.org/nasal or ask Andy about this feature.
Default closure()'s level argument to zero, not nil
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)