Added support for CullVisitor to contain a osg::State. This used when
cull Callbacks require the contextID for doing operations on texture objects, for example. Modified CullVisitor SceneView and Drawable
This commit is contained in:
@@ -257,7 +257,7 @@ void CullVisitor::apply(Geode& node)
|
||||
|
||||
if( drawable->getCullCallback() )
|
||||
{
|
||||
if( drawable->getCullCallback()->cull( this, drawable ) == true )
|
||||
if( drawable->getCullCallback()->cull( this, drawable, _state.valid()?_state.get():NULL ) == true )
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -369,6 +369,8 @@ void SceneView::cullStage(osg::Matrix* projection,osg::Matrix* modelview,osgUtil
|
||||
cullVisitor->setRenderGraph(rendergraph);
|
||||
cullVisitor->setRenderStage(renderStage);
|
||||
|
||||
cullVisitor->setState( _state.get() );
|
||||
|
||||
renderStage->reset();
|
||||
|
||||
// comment out reset of rendergraph since clean is more efficient.
|
||||
|
||||
Reference in New Issue
Block a user