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.
Move point lights to render bin 8, clouds to render bin 9. Turn on
AlphaFunc for cloud layers.
Create a StateAttributeFactory object to create and share common state
objects.
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.
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.
Change include syntax in PathOptions.cxx
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.
To set a path when loading model files, use an osg ReaderWriter::Options object.
Put locks in ModelRegistry::readNode and ModelRegistry::readImage to avoid
conflicts when files are loaded from both the pager and the main thread.
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.
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.
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.
Use only one shared StateSet to control GL_NORMALIZE. This removes
thousands of state sets from the scene graph.
Fix a typo that was causing two copies of groundLights0 to be added to
each tile.
When loading terrain, use DrawElementsUShort where possible.
Don't chunk unconnected triangles in the terrain into seperate
Geometry sets; make the sets as big as possible.
- 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).
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.)
Curt.
* 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.
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.
Problem reported by grtux (gh.robin@laposte.net)
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.