]> git.mxchange.org Git - simgear.git/commit
Change trees code to use a faster OpenGL path
authortimoore <timoore>
Tue, 25 Aug 2009 07:19:39 +0000 (07:19 +0000)
committerTim Moore <timoore@redhat.com>
Tue, 25 Aug 2009 14:14:13 +0000 (16:14 +0200)
commitd4289c5d542465791567af4eecc313b456622017
tree971d7d7609ad6284f65fb57fb74229c94ca847f2
parent0c17c5440ac737337312286afb6fb71ca7f746f4
Change trees code to use a faster OpenGL path

The (random) dimensions of a large number of trees is stored in an
array shared by all the tree geodes. The coordinates of the origin of
each tree are replicated in an another array. This allows an entire
block of trees to be rendered with a few OpenGL calls, instead of one
function call per tree.
simgear/scene/material/Effect.cxx
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