durk [Sat, 17 Nov 2007 09:16:58 +0000 (09:16 +0000)]
Refined debug timing control:
- Added a SampleStatistic class (from the old deprecated libg++) library.
- Make time statistics and printing conditionable
- Added an interface function to switch time stamp collection and printing
on and off from the application (defaults to off).
curt [Mon, 5 Nov 2007 21:42:29 +0000 (21:42 +0000)]
In the original flightgear native/binary scenery terrain data format, we
used short's extensively to represent counts of objects (number of points,
number of texture coordinates, number of traingle strips, etc.) and we used
shorts to index into larger structures. But this capped many of our structure
sizes to a maximum of 32768.
By switching to unsigned shorts in the future, we can double the maximum
object/index counts without losing anything. This was a pretty major
oversight in our original specification.
I have bumped up the native object file version from 6 to 7 and added code
in the reader to maintain full backwards compatibilty with version 6
scenery files (i.e. the current 0.9.10 scenery release.)
durk [Mon, 15 Oct 2007 18:49:50 +0000 (18:49 +0000)]
- A few fixes to ensure SimGear compiles again on cygwin.
* on cygwin, isnan is declared in ieeepf.h
* CYGWIN is a special case in that it is windows based, but sometimes
folows unix conventions. SGAtomic compilation failed on an illegal
volatile type cast without the additional __CYGWIN__ define check.
timoore [Thu, 4 Oct 2007 20:53:22 +0000 (20:53 +0000)]
Don't reset the random texture base when rebuilding a cloud layer
This fix removes obnoxious visuals (texture jumping) when a cloud
layer is moved due to a metar update or, more significantly, when
switching from metar to a scenario. Also, I switched to using a TexMat
to displace the cloud texture in order to avoid writing the texture
array every frame.
Put the ocean tile state set in osg::Geometry, not the osg::Geode, so that
is readily available during intersection testing and can be used to find the
corresponding SGMaterial.
Fix material animations with only a <texture-prop>
On 8/31/07, K. Hoercher <wbhoer@gmail.com> wrote:
> > Some notes:
> > - I found that in order to make the example from model-howto.html work
> > ( starting at "To make a texture replaceable at runtime") one has to
> > specify a valid (i.e. loadable) <texture> in the material animation.
The cause seems to be the condition in SGMaterialAnimation.cxx l.277
ignoring any texture update by the UpdateCallback (only there
<texture-prop> is looked at) without an already existing stateSet.
That in turn will not be created with a <texture-prop> alone l. 379ff.
Unless I overlooked some compelling reason contradicting, I'd like to
suggest allowing for a stateSet to be created for those situations
too. I think that would match the behaviour of animation.cxx
(PRE_OSG_PLIB_20061029) and is imho the more expected and also
documented one.
Documentation fixes: Updated the contents of README.plib and README.OpenAL
Also make sure that these files are included in the release. This is
required, since ./configure refers to these files.
frohlich [Tue, 7 Aug 2007 05:26:21 +0000 (05:26 +0000)]
Modified Files:
projects/VC7.1/SimGear.vcproj projects/VC8/SimGear.vcproj
simgear/math/Makefile.am simgear/math/SGGeoc.hxx
simgear/math/SGGeodesy.cxx simgear/math/SGGeodesy.hxx
simgear/math/polar3d.hxx simgear/math/sg_geodesy.hxx
simgear/math/sg_types.hxx
Removed Files:
simgear/math/polar3d.cxx simgear/math/sg_geodesy.cxx
simgear/math/sg_memory.h:
Remove sg_memory.h It is unused anyway and should not be required
in a c++ world. Move distance course functions to the SG* type
system. Move the implementation into SGGeodesy.cxx. Remove some of
the old Point3D Based sg* functions that are already unused.
Remove an extern SGSky *thesky reference that isn't used in the code anyway.
The original code forced a dependency in SimGear back to something that is
defined globaly in FlightGear, not a great strategy for a library with some
"general purpose" intentions.
Maik JUSTUS: workaround for broken Doppler effect in OpenAL
mf: this patch is meant to be removed as soon as OpenAL got fixed. (The
OpenAL developers acknowleged the bug and announced that it'll get
fixed.) For removal try
$ cd simgear/sound
$ cvs diff -rAFTER_OPENAL_DOPPLER_WORKAROUND -rBEFORE_OPENAL_DOPPLER_WORKAROUND|patch
Maik JUSTUS: Doppler fixes (add option to turn off Doppler for sounds that
shouldn't be affected -- marker beep, ATIS messages, etc.)
mf: this is the first part of the original patch. It is supposed to contain
fixes that are not caused by OpenAL bugs, and thus aren't meant to be
reverted later. The second part will contain a temprary workaround for
OpenAL bugs. Unfortunately, I had to do the split myself as the contributor
refused to do it.
- close loophole through which one could sneak in illegal property names
containing slashes, colons and all sorts of evil characters. In Nasal
this could be done via props.globals.getChild("1!@#$//[]{}", 0, 1).setValue(0);
The cause is that getChild() hands the given name directly over to an
alternative SGPropertyNode ("convenience") constructor which sets the
name without any checks.
- unify exception messages: first character is lower case
replace exit() by throw sg_exception(). Of course, we have to be aware
that interdependencies between sg libs are generally unwelcome, but
sg_exception is a rather basic part, and it's already used by xml, props,
scene, sound and, of course, structure. Since props and xml are core
libs, we can assume that sg_exceptions are available. (OK'ed by Curt)
add SG_ORIGIN macro that expands to a string __FILE__":"__LINE__
Note that __LINE__ is a number and can't be directly used in string
context, which makes the macro worthwhile. (IMHO :-)
mfranz [Mon, 11 Jun 2007 16:09:50 +0000 (16:09 +0000)]
advance tracing messages from SG_INFO to SG_ALERT. If a developer has
demanded tracing, then he shouldn't get these important messages buried
in thousands of lines of meaningless bulk.
frohlich [Fri, 8 Jun 2007 06:50:16 +0000 (06:50 +0000)]
Modified Files:
simgear/scene/material/mat.cxx simgear/scene/material/mat.hxx
simgear/scene/util/SGSceneFeatures.cxx
simgear/scene/util/SGSceneFeatures.hxx:
Olaf Flebbe: Make use of SGSceneFeatues for anisotropic filtering,
clean up.
frohlich [Sun, 3 Jun 2007 18:21:04 +0000 (18:21 +0000)]
Modified Files:
simgear/scene/model/model.cxx
simgear/scene/util/SGSceneFeatures.cxx
simgear/scene/util/SGSceneFeatures.hxx:
Make sure textures are shared. Do not rely on a graphics
context to be available on model loading.
andy [Wed, 30 May 2007 22:49:41 +0000 (22:49 +0000)]
Sync with Nasal upstream. Mostly fixes to naContinue(), which
FlightGear doesn't use. Also includes a performance fix for the
call() builtin that should help Melchior, who was measuring lower
performance for the props.Node() interface than the getprop/setprop
API.
frohlich [Wed, 30 May 2007 13:07:05 +0000 (13:07 +0000)]
Modified Files:
simgear/scene/model/SGMaterialAnimation.cxx:
Olaf Flebbe: Use brakets around bitwise operations.
Greetings from LinuxTag, Berlin ... :)
mfranz [Mon, 7 May 2007 14:03:44 +0000 (14:03 +0000)]
Add method to return the number of attached listeners. Listeners have become
a much more important feature than they were two years or something ago, and
it's helpful for debugging and exploration to get this important node property
shown in property tree dumps or in the property browser (verbose mode).
mfranz [Sun, 6 May 2007 17:33:15 +0000 (17:33 +0000)]
- fix bug where a property tree saved with writeProperties() and read back
in with readProperties() would not look the same, because element indices
of '0' were even dropped when a node has a "secret" value *and* children
- introduce "omit-node" modifier attribute for the "include" attribute.
This inserts the given file in place of the including node, while the
node is dropped. This is desirable for multiple includes (which can't
be done by multiply using the "include" attribute, as this isn't valid
XML spec syntax)
Csaba HALASZ:
- fix bug that messed up leg distances after inserting and deleting waypoints
not at the end of the route
- move add_waypoint() and delete_waypoint from hxx to cxx
- beef up routetest
andy [Mon, 2 Apr 2007 16:14:54 +0000 (16:14 +0000)]
Use __FUNCTION__, which works on gcc and MSVC 7/8, instead of
__func__, which while standardized works only with gcc. I'll wait for
bug reports from VC6 before bothering with fallback code...