Added ViewerBase::s/getUseConfigureAffinity(bool flag) to allow users to toggle whether they want the ViewerBase::setUpThreads() method to call ViewerBase::configureAffinity() or not.

This commit is contained in:
Robert Osfield
2016-09-28 20:30:12 +01:00
parent ee97db3488
commit 91538d90f8
2 changed files with 11 additions and 2 deletions

View File

@@ -80,6 +80,8 @@ void ViewerBase::viewerBaseInit()
{
_runMaxFrameRate = osg::asciiToDouble(str);
}
_useConfigureAffinity = true;
}
void ViewerBase::configureAffinity()
@@ -235,8 +237,8 @@ void ViewerBase::setUpThreading()
_threadingModel = suggestBestThreadingModel();
}
// configure affinity before we start threads
configureAffinity();
// if required configure affinity before we start threads
if (_useConfigureAffinity) configureAffinity();
Contexts contexts;
getContexts(contexts);