"tim recently noticed the database pager was repeatedly loading and unloading
the same objects. he also tracked down the problem to missing bounding sphere
information in osgDB::PagedLOD. this is a simplicistic approach to fix this:
SGPagedLOD will now remember whatever value it sees for getBound() after
loading a child. this patch will make database pager run much calmer."
It turns out that the database pager causes the texture image to be
unloaded after it is applied, so the image and its file name may not
be available for doing the livery substitution. Ask a work around we
set the name of the texture to its file name.
this is a small (-1/+3) patch to fix pick animations on scenery objects.
since picking apparently doesn't care for polygon offsets, the objects
got into the picklist in the wrong way. now, no matter if the "highlight
group" or the "normal group" gets hit first, the callback will fire.
Allows to load submodels with path relative to current model path.
Submodel path must be prefixed by ./ otherwise path is relative to fg_root ( current behavior )
timoore [Mon, 24 Mar 2008 21:41:30 +0000 (21:41 +0000)]
Change the tile light group node mask to traverse VASI lights too.
The change to set the light group node mask to LIGHTS_BITS caused
VASI/PAPI lights to not be displayed during the day. This patch fixes
that and optimizes VASI creation a bit.
timoore [Sat, 22 Mar 2008 09:30:26 +0000 (09:30 +0000)]
model paging patch from Till Busch
Comments from Till:
I started the project at the end of february with a simple idea: move all
3d-model loading to the DatabasePager-thread. my first attempts looked
promising, though they were a little too optimistic (or naive?). the patch
has evolved a lot since.
currently it does the following things:
1. revive SGModelLib, move functions for xml-model-loading there
2. replace all calls to sgLoad3dModel with calls to either
SGModelLib::loadModel() or SGModelLib::loadPagedModel()
almost all models will be loaded by the DatabasePager. the few exceptions are:
your own plane, shared models in scenery, random objects, AIBallistic models.
3. simplify mode-loading functions (avoid passing around fg_root)
4. avoid supurious MatrixTransform nodes in loaded models
mfranz [Thu, 20 Mar 2008 17:20:54 +0000 (17:20 +0000)]
- warnings--
- make one-shot sounds subject to volume and pitch control (To get
constant volume/pitch during the whole lifetime, just *configure*
the sound that way.)
timoore [Tue, 4 Mar 2008 08:58:33 +0000 (08:58 +0000)]
cleanup of precipitation contribution
Reindent everything to Stroustrup style and make member variable style
consistent.
Remove unused header files.
SGPrecipitation is now a subclass of osg::Referenced.
Initialize snow and ice intensity to 0 directly. The methods that set
the intensities change the value slowly and so don't work when the
initial value is garbage.
timoore [Sat, 2 Feb 2008 23:01:27 +0000 (23:01 +0000)]
Cleanup and performance tuning of the random trees code.
The QuadTreeBuilder class was completely revamped as a templated class
to support flexible creation of scene graph quad trees, and a major
bug was fixed as well. Now it actually generates quadtrees instead of
some weird striped thing.
One StateSet is shared among all the "forests." The trees are drawn
after normal terrain objects to minimize some of the transparency
related artifacts.
Lighting was implemented in the ShaderGeometry shader (for both
polygon sides). Ambient-diffuse values for trees are hard-coded in
TreeBin.cxx.
DotOsg wrappers were added for ShaderGeometry so it can be output in
the scene graph dump.
frohlich [Wed, 26 Dec 2007 19:10:40 +0000 (19:10 +0000)]
Modified Files:
Makefile.am
Added Files:
SGExpression.cxx SGExpression.hxx: Add not yet complete but already
usable expression tree. Will be used with the panel code.
frohlich [Wed, 26 Dec 2007 19:05:06 +0000 (19:05 +0000)]
Modified Files:
Makefile.am
Added Files:
SGClipGroup.cxx SGClipGroup.hxx: Add helper group node for reuse
of clipping planes. Will be used for the panel code.
timoore [Thu, 13 Dec 2007 23:30:24 +0000 (23:30 +0000)]
Use node masks and shared state sets to manage ground lights
Do away with the switch in each terrain tile for the ground lights. They are
turned on by node masks now.
Share state sets among all the light nodes and manage the fog values through a
"GroundLightManager" instead of having separate state sets and callback
functions for each group in each tile.
timoore [Tue, 11 Dec 2007 11:07:21 +0000 (11:07 +0000)]
minor fix to ModelRegistry and syntax changes for Windows
Create the local path in the right order in OptionsPusher. When
OptionsPusher is used, put it inside a new code block so the order of
destruction with respect to the mutex on reader functions id clear.
Add #include <algorithm> to top of ModelRegistry.cxx.
timoore [Sun, 9 Dec 2007 22:38:10 +0000 (22:38 +0000)]
Work around osg Registry path list problems
The OSG reader plugins overwrite the path list passed in options with the local
directory of the file being read, forcing you to set the path list in
the Registry. I think this a bug, but in the meantime here's a workaround.
timoore [Thu, 29 Nov 2007 23:56:31 +0000 (23:56 +0000)]
Avoid copying drawables and dirtying display lists.
For the alpha-test animation, use an OVERRIDE attribute on the state
set of the top level node instead of copying drawables and state sets
throughout the model.
As a temporary hack in the blend animation, don't use display lists in
the cloned drawables.
These changes are aimed at cutting down the number of display lists
that the pager needs to compile.
timoore [Thu, 29 Nov 2007 23:56:09 +0000 (23:56 +0000)]
rewrite ModelRegistry callbacks as a template with pluggable policy classes
In a big effort to improve use of the object cache, provide a
ModelRegistryCallback template class with different policies for
substitution, caching, optimization, etc.
Change SGTexDataVarianceVistor to make StateSets static too.
timoore [Thu, 29 Nov 2007 23:55:01 +0000 (23:55 +0000)]
Move SGReadFileCallback from model.cxx to public class ModelRegistry
Move SGReadFileCallback and all its help classes into a new
ModelRegistry class that also provides an interface to add custom
callbacks for specific file extensions. SGReaderWriterBTG uses that to
keep any further processing from being done on .btg files. Various
namespace-releated cleanup was done on this code too.
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).