diff --git a/include/osgViewer/Viewer b/include/osgViewer/Viewer index b8e12a150..46b0ce9a9 100644 --- a/include/osgViewer/Viewer +++ b/include/osgViewer/Viewer @@ -158,9 +158,11 @@ class OSGVIEWER_EXPORT Viewer : public osgViewer::View int _keyEventSetsDone; bool _quitEventSetsDone; - ThreadingModel _threadingModel; - bool _useMainThreadForRenderingTraversal; - BarrierPosition _endBarrierPosition; + ThreadingModel _threadingModel; + bool _threadsRunning; + + bool _useMainThreadForRenderingTraversal; + BarrierPosition _endBarrierPosition; osg::ref_ptr _startRenderingBarrier; osg::ref_ptr _endRenderingDispatchBarrier; diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index d363f3c78..b6181b158 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -237,7 +237,7 @@ struct ViewerDoubleBufferedRenderingOperation : public osg::GraphicsOperation, p // prevent the draw traversal from reading from it before the cull traversal has been completed. if (!_graphicsThreadDoesCull) _mutex[_currentCull].lock(); - osg::notify(osg::NOTICE)<<"constructed)"<add(vdbro); ++numViewerDoubleBufferedRenderingOperation; } else { - osg::notify(osg::NOTICE)<<"non local Camera"<setNumOfBlocks(numViewerDoubleBufferedRenderingOperation); } + if (threadsRunningBeforeSetUpRenderingSupport) startThreading(); } @@ -1221,7 +1235,7 @@ void Viewer::realize() osg::notify(osg::INFO)<<"Viewer::realize() - No valid contexts found, setting up view across all screens."<