Made Refernced::setThreadSafeReferenceCounting(bool) a virtual then overrode

this in various scene graph classes to ensure that the scene graph gets
updated as well as the objects that the initialial call is made from.
This commit is contained in:
Robert Osfield
2007-01-04 16:49:58 +00:00
parent cce656a19b
commit 73fffe1800
19 changed files with 140 additions and 16 deletions

View File

@@ -150,9 +150,6 @@ int main( int argc, char **argv )
}
}
// osg::DisplaySettings::instance()->setMaxNumberOfGraphicsContexts(4);
osg::Referenced::setThreadSafeReferenceCounting(true);
// load the scene.
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
if (!loadedModel)
@@ -172,7 +169,7 @@ int main( int argc, char **argv )
if (apm.valid()) viewer.setCameraManipulator(apm.get());
else viewer.setCameraManipulator( new osgGA::TrackballManipulator() );
#if 1
#if 0
// singleWindowMultipleCameras(viewer);
@@ -184,13 +181,10 @@ int main( int argc, char **argv )
viewer.setUpViewAcrossAllScreens();
#endif
loadedModel->resizeGLObjectBuffers(osg::DisplaySettings::instance()->getMaxNumberOfGraphicsContexts());
viewer.realize();
bool limitNumberOfFrames = false;
bool limitNumberOfFrames = true;
unsigned int numFrames = 0;
unsigned int maxFrames = 10;

View File

@@ -1518,7 +1518,6 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
// todo for osgViewer
osg::DisplaySettings::instance()->setMaxNumberOfGraphicsContexts(2);
osg::Referenced::setThreadSafeReferenceCounting(true);
// construct the viewer.