Moved the moveToRootStateGraph(,) from RenderStage::drawImplemenation() to RenderBin::drawImplementation();
This commit is contained in:
@@ -417,7 +417,17 @@ void RenderBin::drawImplementation(osg::State& state,RenderLeaf*& previous)
|
||||
rbitr->second->draw(state,previous);
|
||||
}
|
||||
|
||||
if (_stateset.valid()) state.popStateSet();
|
||||
// now reset the state so its back in its default state.
|
||||
if (previous)
|
||||
{
|
||||
StateGraph::moveToRootStateGraph(state,previous->_parent);
|
||||
previous = NULL;
|
||||
}
|
||||
|
||||
if (_stateset.valid())
|
||||
{
|
||||
state.popStateSet();
|
||||
}
|
||||
|
||||
//osg::notify(osg::NOTICE)<<"end RenderBin::drawImplementation "<<className()<<std::endl;
|
||||
}
|
||||
|
||||
@@ -870,14 +870,7 @@ void RenderStage::drawImplementation(osg::State& state,RenderLeaf*& previous)
|
||||
// draw the children and local.
|
||||
RenderBin::drawImplementation(state,previous);
|
||||
|
||||
// now reset the state so its back in its default state.
|
||||
if (previous)
|
||||
{
|
||||
StateGraph::moveToRootStateGraph(state,previous->_parent);
|
||||
state.apply();
|
||||
previous = NULL;
|
||||
}
|
||||
|
||||
state.apply();
|
||||
}
|
||||
|
||||
void RenderStage::drawPostRenderStages(osg::State& state,RenderLeaf*& previous)
|
||||
|
||||
@@ -1229,6 +1229,7 @@ void SceneView::draw()
|
||||
|
||||
// re apply the defalt OGL state.
|
||||
_state->popAllStateSets();
|
||||
_state->apply();
|
||||
|
||||
if (_state->getCheckForGLErrors()!=osg::State::NEVER_CHECK_GL_ERRORS)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user