Added handling of automatic setting up of the contextID.

This commit is contained in:
Robert Osfield
2005-07-25 14:28:22 +00:00
parent 3c23a42f17
commit 384830d37e
5 changed files with 137 additions and 17 deletions

View File

@@ -1272,6 +1272,12 @@ void CullVisitor::apply(osg::CameraNode& camera)
traits->_blue = 8;
traits->_alpha = 0; // ???
}
// share OpenGL objects if possible...
if (_state.valid() && _state->getGraphicsContext())
{
traits->_sharedContext = _state->getGraphicsContext();
}
// create the graphics context according to these traits.
context = osg::GraphicsContext::createGraphicsContext(traits.get());