diff --git a/src/osgUtil/RenderStage.cpp b/src/osgUtil/RenderStage.cpp index 293f4f8ef..0d60498ee 100644 --- a/src/osgUtil/RenderStage.cpp +++ b/src/osgUtil/RenderStage.cpp @@ -357,8 +357,10 @@ void RenderStage::runCameraSetUp(osg::State& state) // create the graphics context according to these traits. context = osg::GraphicsContext::createGraphicsContext(traits.get()); - if (context.valid()) + if (context.valid() && context->realize()) { + osg::notify(osg::INFO)<<"RenderStage::runCameraSetUp(State&) Context has been realized "<createGraphicsThread(); - } - else - { - bool result = context->realize(); - osg::notify(osg::INFO)<<"RenderStage::runCameraSetUp(State&) Context has been realized "<