Added prelimnary KdTree data structure and automatic kdtree build support
into osgDB::Registry/osgTerrain so that newly created subgraphs can have KdTree built on all osg::Geometry automatically on load/creation.
This commit is contained in:
@@ -642,6 +642,15 @@ void GeometryTechnique::generateGeometry(Locator* masterLocator, const osg::Vec3
|
||||
|
||||
//geometry->setUseDisplayList(false);
|
||||
geometry->setUseVertexBufferObjects(true);
|
||||
|
||||
|
||||
if (osgDB::Registry::instance()->getBuildKdTreesHint()==osgDB::ReaderWriter::Options::BUILD_KDTREES &&
|
||||
osgDB::Registry::instance()->getKdTreeBuilder())
|
||||
{
|
||||
//osg::notify(osg::NOTICE)<<"osgTerrain::GeometryTechnique::build kd tree"<<std::endl;
|
||||
buffer._geode->accept(*(osgDB::Registry::instance()->getKdTreeBuilder()));
|
||||
//osg::notify(osg::NOTICE)<<"after"<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void GeometryTechnique::applyColorLayers()
|
||||
|
||||
Reference in New Issue
Block a user