Added osg::State::popAllStateSets() method to pop all remain StateSet's off
the state stack, thus readying the state object to recieve a new frame. Removed the state.reset() call in osgUtil::SceneView::cull() as this was causing problems with stats producing inheritance of state when toggling stats on.
This commit is contained in:
@@ -211,7 +211,7 @@ void SceneView::cull()
|
||||
}
|
||||
|
||||
// we in theory should be able to be able to bypass reset, but we'll call it just incase.
|
||||
_state->reset();
|
||||
//_state->reset();
|
||||
|
||||
_state->setFrameStamp(_frameStamp.get());
|
||||
_state->setDisplaySettings(_displaySettings.get());
|
||||
@@ -805,6 +805,9 @@ void SceneView::draw()
|
||||
_renderStage->drawPreRenderStages(*_state,previous);
|
||||
_renderStage->draw(*_state,previous);
|
||||
}
|
||||
|
||||
// re apply the defalt OGL state.
|
||||
_state->popAllStateSets();
|
||||
|
||||
GLenum errorNo = glGetError();
|
||||
if (errorNo!=GL_NO_ERROR)
|
||||
|
||||
Reference in New Issue
Block a user