fredb [Thu, 19 Feb 2009 20:41:36 +0000 (20:41 +0000)]
Fix to compile with MSC
Tim Moore [Sun, 15 Feb 2009 23:48:00 +0000 (00:48 +0100)]
Merge branch 'topic/nasal' into next
mfranz [Sun, 15 Feb 2009 16:54:39 +0000 (16:54 +0000)]
"io.flush() implementation from Melchior. Also add a final filetype
element to the io.stat() array, which has been sitting around on my
box for a while and doesn't seem to have broken anything." -- Andy
(forward port from nasal/cvs)
Tim Moore [Fri, 13 Feb 2009 09:07:15 +0000 (10:07 +0100)]
Merge branch 'topic/gcintersect' into next
Tim Moore [Fri, 13 Feb 2009 08:35:50 +0000 (09:35 +0100)]
New getPrimitive function.
This searches for the primitive found in an OSG intersection query.
Tim Moore [Fri, 6 Feb 2009 23:37:47 +0000 (00:37 +0100)]
Make SGSubsystemGroup::Member copy constructor private.
The copy constructor wouldn't make any sense and would confuse ownership of
the subsystem pointer. Problem noted by John Denker.
Tim Moore [Fri, 6 Feb 2009 18:16:19 +0000 (19:16 +0100)]
Merge branch 'topic/cloudz' into next
Tim Moore [Fri, 6 Feb 2009 16:47:55 +0000 (17:47 +0100)]
Turn off z buffer writes for clouds.
This is standard practice for semi-transparent objects and should cut down
on the flickering and other sorting artifacts.
fredb [Sun, 25 Jan 2009 11:53:35 +0000 (11:53 +0000)]
Update MSVC 7.1 projects - Remove pthreads dependency
Tim Moore [Wed, 4 Feb 2009 10:03:20 +0000 (11:03 +0100)]
Merge branch 'maint' into next
Tim Moore [Wed, 4 Feb 2009 10:02:30 +0000 (11:02 +0100)]
Merge branch 'releng/1.9.1' into maint
durk [Mon, 2 Feb 2009 05:34:13 +0000 (05:34 +0000)]
Synchronize the version number with our mainantance release.
Tim Moore [Fri, 30 Jan 2009 09:37:06 +0000 (10:37 +0100)]
Build trees under a transform note that is rotated to Z-up.
This allows the tree geometry to be shared across the entire scene because it
doesn't need to be rotated for each scenery tile.
Tim Moore [Thu, 29 Jan 2009 06:22:42 +0000 (07:22 +0100)]
Don't expand all the trees into display lists.
This can chew up large amounts of memory for questionable gains. We do
let the tree model geometry be in a display list if OSG chooses to put
it there.
Various renaming and cleanup. Save some memory by reverting
ShaderGeometry's base class back to osg::Drawable.
Tim Moore [Wed, 28 Jan 2009 06:53:38 +0000 (07:53 +0100)]
Merge branch 'topic/yontree' into next
Tim Moore [Wed, 28 Jan 2009 06:53:31 +0000 (07:53 +0100)]
Merge branch 'maint' into next
durk [Tue, 27 Jan 2009 22:43:13 +0000 (22:43 +0000)]
For the first time (no pun intended) in almost ten years time (again no
pun intended) that I'm touching the time library.
Brian Schack reported that the traffic scheduler messes up the timestamps
of the atlas network output. As it turns out, the c library functions
asctime, and gmtime use a static copy of the tm struct to do the internal
formatting. Our linux port of the SGTime class, incidentally, also stored
it's master time stamp in this very same struct. Thus, formatting an
arbitrary time value, would have the unwanted side effect of time travel.
Usually, this would go unnoticed, because the actual time parameters would
be updated before any damage could be done. But unwanted side effects, as
in Brian's example could occur.
On the MSVC port this appears to not have been a problem. Since that port
used a copy of the tm struct to store it's master time stamps. Since the
MSVC code also compiles cleanly on linux, it seems to be the way to go to
use that approach. In addition, it also removes some conditional compile
directives.
I've only run a short test, but didn't see any undesirable side effects.
mfranz [Mon, 26 Jan 2009 18:01:48 +0000 (18:01 +0000)]
Csaba HALASZ: set _arg even if there's no <command> (crash fix)
Tim Moore [Wed, 28 Jan 2009 06:43:09 +0000 (07:43 +0100)]
Use osg::Geometry code to draw trees ourselves.
This reverts back in the direction of Yon's original patch: the model is
drawn within ShaderGeometry::drawImplementation. This saves a lot of memory
over the previous approach of creating a PrimitiveSet for each model.
Tim Moore [Fri, 23 Jan 2009 22:27:48 +0000 (23:27 +0100)]
Merge branch 'topic/modelopt' into next
Tim Moore [Fri, 23 Jan 2009 22:27:37 +0000 (23:27 +0100)]
Merge branch 'topic/yontree' into next
Tim Moore [Fri, 23 Jan 2009 13:36:53 +0000 (14:36 +0100)]
QuadTreeBuilder: create leaves on demand
This avoids lots of empty leaves.
Tim Moore [Wed, 21 Jan 2009 21:20:03 +0000 (22:20 +0100)]
Rewrite ShaderGeometry to use display lists and OSG primitives.
Based on a patch from Yon Uriarte.
Eliminate _trees list from ShaderGeometry
Use the position and scale values that are already available.
Tim Moore [Fri, 23 Jan 2009 14:22:40 +0000 (15:22 +0100)]
Optimize empty groups from .ac models
The OSG optimizer seems to have changed since this work was originally done.
Tim Moore [Sun, 18 Jan 2009 23:13:07 +0000 (00:13 +0100)]
Merge branch 'maint' into next
Tim Moore [Sun, 18 Jan 2009 23:04:59 +0000 (00:04 +0100)]
Protect against division by zero in QuadTreeBuilder
This could only happen when there's one leaf in the tree, or all the objects
happen to have the same position. Noticed by Csaba Halaz
Tim Moore [Thu, 15 Jan 2009 23:37:40 +0000 (00:37 +0100)]
Sort cloud sprites using std::sort, based on projected Z.
A "cleanup" of cloud sorting.
Tim Moore [Thu, 15 Jan 2009 21:52:11 +0000 (22:52 +0100)]
Merge branch 'foo' into next
jmt [Thu, 15 Jan 2009 14:46:37 +0000 (14:46 +0000)]
Fix linkage of test programs with OpenThreads.
jmt [Thu, 15 Jan 2009 14:34:33 +0000 (14:34 +0000)]
Commit Benoit Laniel's patch which converts more SimGear pieces to use
OpenThreads primitives directly.
jmt [Thu, 15 Jan 2009 14:31:51 +0000 (14:31 +0000)]
Since we're now sure 1.9.1 will not be released from trunk, here's Yon
Uriarte's patch to convert SGReferenced over to OpenThread's atomic int.
Tim Moore [Wed, 14 Jan 2009 21:34:20 +0000 (22:34 +0100)]
Merge branch 'maint' into next
Tim Moore [Wed, 14 Jan 2009 21:13:12 +0000 (22:13 +0100)]
Remove OptionsPusher and manipulation of osgDB dataFilePathList.
The bug it worked around has been fixed in the OSG ac3d loader, and changing
the path list has unpleasant multithreading implications.
Tim Moore [Wed, 14 Jan 2009 11:13:44 +0000 (12:13 +0100)]
Merge branch 'maint' into next
Tim Moore [Wed, 14 Jan 2009 11:10:23 +0000 (12:10 +0100)]
SGPropertyNode must increment / decrement the reference counter in an aliased
node.
From Csaba Halász.
Tim Moore [Tue, 13 Jan 2009 21:58:45 +0000 (22:58 +0100)]
Merge branch 'topic/mat-anim' into next
Tim Moore [Tue, 13 Jan 2009 21:52:19 +0000 (22:52 +0100)]
Merge branch 'maint' into next
Tim Moore [Tue, 13 Jan 2009 13:10:15 +0000 (14:10 +0100)]
SGMaterialAnimation: Don't install an update callback if values are static
Tim Moore [Tue, 13 Jan 2009 11:50:47 +0000 (12:50 +0100)]
SGMaterialAnimation: factor out update of osg::Material
fredb [Tue, 13 Jan 2009 07:49:14 +0000 (07:49 +0000)]
Csaba/Jester : fix the material animation and display night textures
Tim Moore [Mon, 12 Jan 2009 12:14:31 +0000 (13:14 +0100)]
Merge branch 'maint' into next
fredb [Sat, 10 Jan 2009 18:53:50 +0000 (18:53 +0000)]
fix end of file
fredb [Sat, 10 Jan 2009 16:12:50 +0000 (16:12 +0000)]
ignore generated files
timoore [Sat, 27 Dec 2008 08:16:03 +0000 (08:16 +0000)]
Fix include path
jmt [Fri, 26 Dec 2008 12:08:28 +0000 (12:08 +0000)]
Add some syntactic helpers to allow distance/course to be queried between
two geodetic points. This still entails a full _geo_inverse_wgs_84 call,
but makes call sites neater.
jmt [Fri, 26 Dec 2008 12:27:32 +0000 (12:27 +0000)]
Fix test-program linkage now sgmath depends on sgstructure.
jmt [Fri, 26 Dec 2008 11:42:04 +0000 (11:42 +0000)]
Fix a potential crash when OSG is misconfigured, and an appropriate image
loading plugin cannot be found.
mfranz [Mon, 22 Dec 2008 18:01:34 +0000 (18:01 +0000)]
compilation fix: <cstring> for strcmp()
mfranz [Sun, 21 Dec 2008 15:01:11 +0000 (15:01 +0000)]
- shininess is in the rage 0..128
- restore fg/plib compatibility (there is/was no <shininess> group)
(we may want to change that in the (near?) future, though)
durk [Sat, 20 Dec 2008 09:10:43 +0000 (09:10 +0000)]
Documentation update regarding OpenAL and OSG.
curt [Fri, 19 Dec 2008 20:39:59 +0000 (20:39 +0000)]
Attempt to sort out the version number mess in preparation for a 1.9.0 release.
fredb [Fri, 19 Dec 2008 07:39:09 +0000 (07:39 +0000)]
Stuart Buchanan :
Attached is yet another 3D clouds patch, to fix the following:
1) The 3D clouds were not modified by the cloud coverage, due to some problems with osg::Switch
2) METAR changes to cloud coverage were not obeyed.
3) Making changes via the Cloud dialog had no effect unless 3D clouds were toggled.
4) Cloud cover was too sparse.
5) 3D Stratus clouds caused performance issues on some hardware (fixed by removing 3D stratus from cloudlayers.xml - it will now be a 2D layer).
mfranz [Thu, 18 Dec 2008 22:51:58 +0000 (22:51 +0000)]
James TURNER: make the index of the current waypoint available
fredb [Sun, 14 Dec 2008 18:47:30 +0000 (18:47 +0000)]
Stuart :
the 3D clouds now respect changes to the environment caused by updated METAR etc.
It also increases the AlphaFunc as suggested by Tim.
fredb [Fri, 12 Dec 2008 20:02:44 +0000 (20:02 +0000)]
Csaba/Jester : fix a problem with tex transform animation
fredb [Fri, 12 Dec 2008 19:57:25 +0000 (19:57 +0000)]
Csaba/Jester : fix a problem with material animation
fredb [Fri, 12 Dec 2008 07:41:44 +0000 (07:41 +0000)]
Print the name of the file generating an OpenAL error
fredb [Thu, 11 Dec 2008 08:24:35 +0000 (08:24 +0000)]
Stuart :
- Removes the cloud type re-use code - I think they aren't worth the graphical artefacts that they cause in light of Tim's improvements
- Changes the transparency of the clouds. Previously, the clouds were transparent at 0m distance, opaque at 200m, then gradually more transparent to the fog limits. This meant they were generally quite transparent. Now, they are opaque from 200m to 15km, then become transparent at 20km. A side effect of this is that the current textures could probably benefit from being made slightly transparent to improve the blending of the sprites against each other.
fredb [Thu, 11 Dec 2008 08:23:37 +0000 (08:23 +0000)]
Update MSVC 7.1 projects. Add Boost
timoore [Wed, 10 Dec 2008 22:39:48 +0000 (22:39 +0000)]
Use a singleton Fog attribute for all 3D clouds.
Don't update this Fog with any kind of update callback; instead, update from
the sky repaint method.
timoore [Wed, 10 Dec 2008 22:39:23 +0000 (22:39 +0000)]
Use StateAttributeFactory for CullFace and ShadeModel attributes
timoore [Wed, 10 Dec 2008 22:39:02 +0000 (22:39 +0000)]
Use Boost singleton template for our singletons
timoore [Wed, 10 Dec 2008 22:38:34 +0000 (22:38 +0000)]
Render cloud layers with face culling
Also, allow definition of colors for the cloud layer corners for debugging.
timoore [Wed, 10 Dec 2008 22:38:14 +0000 (22:38 +0000)]
Add cullFaceFront as a state attribute to the StateAttributeFactory
timoore [Wed, 10 Dec 2008 22:37:52 +0000 (22:37 +0000)]
Render sky with depth test off.
Also, don't set BACKGROUND_BIT for cloud layers.
durk [Wed, 10 Dec 2008 18:20:36 +0000 (18:20 +0000)]
Finalizing the preparation of SimGear-1.99.5-rc2.
fredb [Sat, 6 Dec 2008 23:02:42 +0000 (23:02 +0000)]
Stuart Buchanan :
- Replaces simple shader attributes with vectors (this was missed out of the last patch by mistake)
- Includes Yon's Fog update code (Thanks!)
- Fixes a bug since 1.0 where --enable-real-weather-fetch stopped the other weather scenarios from working.
fredb [Sat, 6 Dec 2008 23:01:24 +0000 (23:01 +0000)]
Ugly hack to fix a memory corruption problem
fredb [Thu, 4 Dec 2008 20:56:03 +0000 (20:56 +0000)]
Stuart Buchanan :
This provides the following enhancements & bug fixes
- Fix the chequer-board bug.
- Add proper cloud coverage function - so scattered clouds are now truly scattered.
- Add real-time control for visibility range.
- Use a limited set of clouds rather than generating a completely new Geode for each cloud. This saves sorting and display time.
- Add controls to Rendering dialog to allow fine-tuning of the number of sprites, cloud visibility and the number of different types of cloud.
- Add some variance to the sort back-off to avoid all clouds being sorted at the same time.
- Pack attributes into vectors for performance
- Re-order the cloud type determination code so that if a cloud layer could either be stratus or cumulus, cumulus is used.
- Lowered the cloud level in the standard cloud configuration slightly so a cumulus layer is generated rather than stratus.
These last two mean that you should see some 3D cumuli if disabling real weather fetch.
My thanks to Yon Uriarte for his help with performance work.
fredb [Sun, 30 Nov 2008 23:06:18 +0000 (23:06 +0000)]
Stuart:
Attached is another clouds patch. This does the following:
1) Puts the 3D clouds in a cloud rendering bin, to reduce the transparent edge problem. Viewing 3d clouds against a 2D layer _above_ it now blends correctly. There is still a problem when viewing a layer below the 3d clouds, and I'm not sure if/how I'll manage to solve that. Thanks to Tim for pointing me at the correct code (again).
2) Performance improvement by calculating the Bounding box when the cloud is generated rather than ever time it is requested.
timoore [Sat, 29 Nov 2008 00:17:29 +0000 (00:17 +0000)]
logstream improvements from Yon Uriarte
Avoid descending into iostream when a message won't be logged.
fredb [Wed, 26 Nov 2008 07:28:10 +0000 (07:28 +0000)]
Stuart:
> Something has changed in the environment manager which means that clouds
> generateion is now inconsistent. I'm still tracking it down, as my recent
> changes shouldn't have affected this.
Well, the cause was a bug in my code, but it didn't expose itself until we moved
to multiple cameras. The attached patch fixes the problem.
I've also put in a new heuristic to improve the frame-rate. Clouds that are already sorted
are likely to still be sorted in subsequent frames. Therefore I've put in a back-off
mechanism for the bubble-sort pass. This should mean that if you stay completely
stationary, once the clouds become sorted they will eventually only perform a
bubble sort pass every 128 frames.
timoore [Mon, 24 Nov 2008 22:08:31 +0000 (22:08 +0000)]
Track time in TileCache; assign new tiles the current time
fredb [Mon, 24 Nov 2008 20:26:12 +0000 (20:26 +0000)]
Stuart :
> Warning: detected OpenGL error 'valeur non valide' after RenderBin::draw(,)
Fixed in the patch below. For some reason the shader didn't like index 16 being used...
The patch also fixes the chequer-board effect that was causing very sparse cloud cover.
fredb [Sun, 23 Nov 2008 12:14:56 +0000 (12:14 +0000)]
Stuart Buchanan :
Attached is a small patch for 3D clouds.
It provide the following:
1) Proper spherical distribution of sprites (previously they were distributed cylindrically - whoops)
2) Better shading, so the bottom of the cloud is darker than the top.
3) Fixed a couple of texture sizing bugs.
timoore [Fri, 21 Nov 2008 14:48:15 +0000 (14:48 +0000)]
Templates for interacting with OSG objects
timoore [Tue, 18 Nov 2008 22:16:58 +0000 (22:16 +0000)]
Template functions and overloaded functions for accessing property values.
These are useful for writing templates that manipulate properties.
curt [Sun, 9 Nov 2008 15:39:54 +0000 (15:39 +0000)]
Manuel Massing:
Attached is a small fix for the sorting in CloudShaderGeometry.cxx.
I think the sorting problem stems from the osg idiosyncracy
to store transposed matrices...so the intuitive
osg::Vec4f p = vm * osg::Vec4f(_cloudsprites[i]->position.osg(), 1.0f);
needs to be replaced with...
osg::Vec4f p = vm.preMult(osg::Vec4f(_cloudsprites[i]->position.osg(), 1.0f);
The patch also optimizes the distance calculation - it evaluates the distances
in model space instead of eye space, which reduces computation to a dot-
product instead of a matrix multiplication.
fredb [Thu, 6 Nov 2008 21:58:07 +0000 (21:58 +0000)]
Stuart Buchanan :
It fixes the following issues (to a greater or lesser extent):
1) Performance. Quad trees used to improve culling, and the sprites are placed on the surface of a sphere rather than
randomly throughout the cloud, requiring fewer textures. This saves about 5-10fps on my machine.
2) Disabled 3D clouds have no performance impact. Previously they were still in the scenegraph. Now they are removed.
3) Clouds are now loaded on start-up, and don't require the scenario to be changed, they also work with METAR.
4) The cloud field is shifted as you travel. There's a small bug in that the clouds "jump" as you reach the edge of the field.
5) Iterative sorting of sprites. This doesn't appear to solve the alpha blending problem completely, but may help a bit.
timoore [Fri, 31 Oct 2008 09:46:23 +0000 (09:46 +0000)]
Respect precipitation-enable property
From Csaba Halász
timoore [Thu, 30 Oct 2008 23:51:41 +0000 (23:51 +0000)]
enable world coordinate particle fix
curt [Thu, 30 Oct 2008 17:51:00 +0000 (17:51 +0000)]
Tidy up for a source code "snapshot" release.
fredb [Sun, 26 Oct 2008 09:37:13 +0000 (09:37 +0000)]
3D clouds from Stuart Buchanan. Need a recent driver update, --enable-clouds3d option and a Weather Scenario to show up
curt [Thu, 23 Oct 2008 18:46:55 +0000 (18:46 +0000)]
Fix a few spelling errors.
mfranz [Sat, 18 Oct 2008 18:44:36 +0000 (18:44 +0000)]
fix regression: sgLoad3DModel_internal should not make assumptions
about the type of SGModelData. This *can* have to do with Nasal,
but doesn't have to. That's entirely that class instance's business.
mfranz [Fri, 17 Oct 2008 21:15:58 +0000 (21:15 +0000)]
add global switch for particle systems
mfranz [Tue, 14 Oct 2008 13:01:01 +0000 (13:01 +0000)]
allow to modify the XML animation config of a loaded submodel by
defining an <overlay> branch, which is copied over the submodel's
properties before the animations are evaluated
mfranz [Tue, 14 Oct 2008 11:03:39 +0000 (11:03 +0000)]
Move omit-node part from startElement to endElement to allow nodes
of this type to have children. We have to save the omit state on the
stack for that.
durk [Tue, 14 Oct 2008 05:04:43 +0000 (05:04 +0000)]
Syd Adams: Replace rgb with png.
mfranz [Fri, 10 Oct 2008 09:48:03 +0000 (09:48 +0000)]
s/multiplayer/multiplay/, as this seems to be the slightly more
official version (--multiplay option, /sim/multiplay/ properties etc.)
mfranz [Thu, 9 Oct 2008 22:20:33 +0000 (22:20 +0000)]
if a model XML file contains a <multiplayer> block, copy its contents
to the model's property root (/ai/models/multiplayer[*])
andy [Tue, 30 Sep 2008 21:52:44 +0000 (21:52 +0000)]
Yeah, I really shouldn't be in the lexer
andy [Tue, 30 Sep 2008 20:19:01 +0000 (20:19 +0000)]
Another lexer fix
andy [Tue, 30 Sep 2008 19:06:34 +0000 (19:06 +0000)]
Fix broken lex.c checkin
andy [Tue, 30 Sep 2008 16:48:36 +0000 (16:48 +0000)]
Fixes for bugs shaken out in the recent push: die properly for nil
indexes in slices. Fix string conversion issue with bare "+" and "-".
Fix lexing of exponent expressions such that "1e" is not a number.
fredb [Sun, 28 Sep 2008 08:11:10 +0000 (08:11 +0000)]
MINGW patch by Csaba Halasz
andy [Fri, 26 Sep 2008 19:18:19 +0000 (19:18 +0000)]
Fix parsing for degenerate cases like a[,] a[:] and {:}. The slicing syntax exposed the low-level generators to some new cases.
andy [Fri, 26 Sep 2008 18:22:12 +0000 (18:22 +0000)]
Sync with Nasal upstream (Melchior already had a chance to test this,
so hopefully not too much breaks). New syntax features:
1. Call-by-name function arguments. You can specify a hash literal in
place of ordered function arguments, and it will become the local
variable namespace for the called function, making functions with many
arguments more readable. Ex:
view_manager.lookat(heading:180, pitch:20, roll:0, x:X0, y:Y0, z:Z0,
time:now, fov:55);
Declared arguments are checked and defaulted as would be expected:
it's an error if you fail to pass a value for an undefaulted argument,
missing default arguments get assigned, and any rest parameter
(e.g. "func(a,b=2,rest...){}") will be assigned with an empty vector.
2. Vector slicing. Vectors (lists) can now be created from others
using an ordered list of indexes and ranges. For example:
var v1 = ["a","b","c","d","e"]
var v2 = v1[3,2]; # == ["d","c"];
var v3 = v1[1:3]; # i.e. range from 1 to 3: ["b","c","d"];
var v4 = v1[1:]; # no value means "to the end": ["b","c","d","e"]
var i = 2;
var v5 = v1[i]; # runtime expressions are fine: ["c"]
var v6 = v1[-2,-1]; # negative indexes are relative to end: ["d","e"]
The range values can be computed at runtime (e.g. i=1; v5=v1[i:]).
Negative indices work the same way the do with the vector functions
(-1 is the last element, -2 is 2nd to last, etc...).
3. Multi-assignment expressions. You can assign more than one
variable (or lvalue) at a time by putting them in a parenthesized
list:
(var a, var b) = (1, 2);
var (a, b) = (1, 2); # Shorthand for (var a, var b)
(var a, v[0], obj.field) = (1,2,3) # Any assignable lvalue works
var color = [1, 1, 0.5];
var (r, g, b) = color; # works with runtime vectors too
timoore [Thu, 11 Sep 2008 10:19:05 +0000 (10:19 +0000)]
Keep non-local particles in a Z-up frame that is periodically moved.
This eliminates jitter and other rendering problems.
For the moment this is dependent on an osg fix.
Also, don't read wind properties from FlightGear; provide a mechanism
for fg to set the wind.
ehofman [Thu, 4 Sep 2008 08:52:47 +0000 (08:52 +0000)]
Make sure the compiler is aware that SGModelData a child of osg::Referenced, now gcc-3.3 will compile.