"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.
Also, add a NodeAndDrawableVisitor that descends into osg::Drawable.
That motivation for this is that it's a bad idea to modify state sets
that the osgDB::SharedStateManager might be keeping.
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.
Add more points to the dome, giving it a dome shape rather than a
dunce cap shape.
Represent as OpenGL DrawElements instead of as triangle strips.
Only calculate have the sky colors and reflect those across the dome.
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.
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
5. fix some memory leaks
- 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.)
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.
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.
In addition to Stuart's changes, there's an independent quad tree
builder class for constructing loose quad trees from scene graph nodes.
Stuart also implemented changes to the random number generator suggested by
Andy Ross.