From aa73e1d1d43c699814b652010e055d10ee4332af Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 6 Jun 2008 10:51:23 +0000 Subject: [PATCH] Added update traversal to run prior to doing kdtree build to make sure that costs in build osgTerrain databases isn't incurred during the build traversal. --- examples/osgkdtree/osgkdtree.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/osgkdtree/osgkdtree.cpp b/examples/osgkdtree/osgkdtree.cpp index ec88197fa..1e177d05e 100644 --- a/examples/osgkdtree/osgkdtree.cpp +++ b/examples/osgkdtree/osgkdtree.cpp @@ -32,6 +32,7 @@ #include #include +#include #include #include @@ -485,6 +486,10 @@ int main(int argc, char **argv) } + osgUtil::UpdateVisitor updateVisitor; + scene->accept(updateVisitor); + + osg::Timer_t start = osg::Timer::instance()->tick(); osg::KDTreeBuilder builder;