]> git.mxchange.org Git - simgear.git/commit
Cleanup and performance tuning of the random trees code.
authortimoore <timoore>
Sat, 2 Feb 2008 23:01:27 +0000 (23:01 +0000)
committertimoore <timoore>
Sat, 2 Feb 2008 23:01:27 +0000 (23:01 +0000)
commitbe616894586358a2804207bc984c5429dafdcc39
treec8355fdf7a025647684c192273f1cf12b0d3951e
parent4b63bc051e701835a12f6f1eca5437b6abd58593
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.
simgear/scene/tgdb/ShaderGeometry.cxx
simgear/scene/tgdb/ShaderGeometry.hxx
simgear/scene/tgdb/TreeBin.cxx
simgear/scene/tgdb/TreeBin.hxx
simgear/scene/tgdb/obj.cxx
simgear/scene/util/QuadTreeBuilder.cxx
simgear/scene/util/QuadTreeBuilder.hxx
simgear/scene/util/RenderConstants.hxx
simgear/scene/util/StateAttributeFactory.cxx
simgear/scene/util/StateAttributeFactory.hxx
simgear/scene/util/VectorArrayAdapter.hxx