Improved the mapping of update and cull traversal
This commit is contained in:
@@ -531,18 +531,22 @@ void GeometryTechnique::init()
|
||||
}
|
||||
|
||||
|
||||
void GeometryTechnique::update(osgUtil::UpdateVisitor* nv)
|
||||
void GeometryTechnique::update(osgUtil::UpdateVisitor* uv)
|
||||
{
|
||||
|
||||
if (_terrainNode) _terrainNode->osg::Group::traverse(*uv);
|
||||
}
|
||||
|
||||
|
||||
void GeometryTechnique::cull(osgUtil::CullVisitor* nv)
|
||||
void GeometryTechnique::cull(osgUtil::CullVisitor* cv)
|
||||
{
|
||||
#if 0
|
||||
if (_terrainNode) _terrainNode->osg::Group::traverse(*cv);
|
||||
#else
|
||||
if (_transform.valid())
|
||||
{
|
||||
_transform->accept(*nv);
|
||||
_transform->accept(*cv);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void GeometryTechnique::cleanSceneGraph()
|
||||
|
||||
@@ -99,6 +99,36 @@ void TerrainNode::setColorFilter(unsigned int i, Filter filter)
|
||||
_colorLayers[i].filter = filter;
|
||||
}
|
||||
|
||||
void TerrainNode::addCompileGraphicsContext(osg::GraphicsContext* gc)
|
||||
{
|
||||
for(CompileGraphicsContexts::iterator itr = _compileGraphicsContexts.begin();
|
||||
itr != _compileGraphicsContexts.end();
|
||||
++itr)
|
||||
{
|
||||
if (*itr == gc)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
_compileGraphicsContexts.push_back(gc);
|
||||
}
|
||||
|
||||
void TerrainNode::removeCompileGraphicsContext(osg::GraphicsContext* gc)
|
||||
{
|
||||
for(CompileGraphicsContexts::iterator itr = _compileGraphicsContexts.begin();
|
||||
itr != _compileGraphicsContexts.end();
|
||||
++itr)
|
||||
{
|
||||
if (*itr == gc)
|
||||
{
|
||||
_compileGraphicsContexts.erase(itr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
osg::BoundingSphere TerrainNode::computeBound() const
|
||||
{
|
||||
osg::BoundingSphere bs;
|
||||
|
||||
@@ -40,14 +40,16 @@ void TerrainTechnique::init()
|
||||
_dirty = false;
|
||||
}
|
||||
|
||||
void TerrainTechnique::update(osgUtil::UpdateVisitor*)
|
||||
void TerrainTechnique::update(osgUtil::UpdateVisitor* uv)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<className()<<"::update(..) not implementated yet"<<std::endl;
|
||||
if (_terrainNode) _terrainNode->osg::Group::traverse(*uv);
|
||||
}
|
||||
|
||||
void TerrainTechnique::cull(osgUtil::CullVisitor*)
|
||||
void TerrainTechnique::cull(osgUtil::CullVisitor* cv)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<className()<<"::cull(..) not implementated yet"<<std::endl;
|
||||
if (_terrainNode) _terrainNode->osg::Group::traverse(*cv);
|
||||
}
|
||||
|
||||
void TerrainTechnique::cleanSceneGraph()
|
||||
|
||||
Reference in New Issue
Block a user