From ab029febbd68aafd3b4bbea3719d9df8e20302cf Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 29 Jun 2009 09:46:40 +0000 Subject: [PATCH] Made --pssm and --sv options use SingleThreaded viewer to workaround threading issues with ParallelSplitShadowMap and ShadowVolume techniques. --- examples/osgshadow/osgshadow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/osgshadow/osgshadow.cpp b/examples/osgshadow/osgshadow.cpp index a89dd9312..4c5c3e955 100644 --- a/examples/osgshadow/osgshadow.cpp +++ b/examples/osgshadow/osgshadow.cpp @@ -600,6 +600,9 @@ int main(int argc, char** argv) if (arguments.read("--sv")) { + // sv isn't yet thread safe + viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); + // hint to tell viewer to request stencil buffer when setting up windows osg::DisplaySettings::instance()->setMinimumNumStencilBits(8); @@ -622,6 +625,9 @@ int main(int argc, char** argv) } else if (arguments.read("--pssm")) { + // pssm isn't yet thread safe + viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); + int mapcount = 3; while (arguments.read("--mapcount", mapcount)); osg::ref_ptr pssm = new osgShadow::ParallelSplitShadowMap(NULL,mapcount);