Fixed pbuffer usage cross multiple graphics contexts

This commit is contained in:
Robert Osfield
2006-08-11 11:05:09 +00:00
parent dd85c271a9
commit d1fe85caf6
2 changed files with 17 additions and 0 deletions

View File

@@ -519,6 +519,13 @@ void RenderStage::runCameraSetUp(osg::State& state)
if (state.getGraphicsContext())
{
traits->_sharedContext = state.getGraphicsContext();
const osg::GraphicsContext::Traits* sharedTraits = traits->_sharedContext->getTraits();
if (sharedTraits)
{
traits->_displayNum = sharedTraits->_displayNum;
traits->_screenNum = sharedTraits->_screenNum;
}
}
// create the graphics context according to these traits.