From b315ed4d5821f206f7dedc70fda42a48ebaaee72 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 2 Jan 2007 13:02:30 +0000 Subject: [PATCH] Shifted the setting of thread safe ref/unref to earlier in the main to ensure that the Viewer's view is set up thread safe. --- examples/osgcatch/osgcatch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/osgcatch/osgcatch.cpp b/examples/osgcatch/osgcatch.cpp index 1a0605cc9..55c36efe3 100644 --- a/examples/osgcatch/osgcatch.cpp +++ b/examples/osgcatch/osgcatch.cpp @@ -1517,13 +1517,13 @@ int main( int argc, char **argv ) arguments.getApplicationUsage()->addCommandLineOption("-y ","Vertical offset of left and right images."); arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); + // todo for osgViewer + osg::DisplaySettings::instance()->setMaxNumberOfGraphicsContexts(2); + osg::Referenced::setThreadSafeReferenceCounting(true); // construct the viewer. osgViewer::Viewer viewer; - // todo for osgViewer - osg::DisplaySettings::instance()->setMaxNumberOfGraphicsContexts(2); - osg::Referenced::setThreadSafeReferenceCounting(true); // register the handler to add keyboard and mosue handling. GameEventHandler* seh = new GameEventHandler();