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.
This commit is contained in:
Robert Osfield
2007-01-02 13:02:30 +00:00
parent d068f7025a
commit b315ed4d58

View File

@@ -1517,13 +1517,13 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->addCommandLineOption("-y <float>","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();