From 449333b5d35ada0d214241441ca64d54f3385d3b Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 6 Oct 2005 15:41:47 +0000 Subject: [PATCH] Changed the fallback code to use the result form the realize() call, removed the code path from running a PBuffer as a seperate graphics context (this was found to be slower than running single threaded so its not worth the extra complexity). --- src/osgUtil/RenderStage.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) 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 "<