Fixed compute of numProcessors

This commit is contained in:
Robert Osfield 2016-06-24 16:05:07 +01:00
parent 9dffcaf36a
commit 295da33cdf
2 changed files with 2 additions and 2 deletions

View File

@ -654,7 +654,7 @@ void CompositeViewer::realize()
if (osg::DisplaySettings::instance()->getCompileContextsHint())
{
int numProcessors = osg::minimum(1, OpenThreads::GetNumberOfProcessors());
int numProcessors = osg::maximum(1, OpenThreads::GetNumberOfProcessors());
int processNum = 0;
for(unsigned int i=0; i<= osg::GraphicsContext::getMaxContextID(); ++i)

View File

@ -596,7 +596,7 @@ void Viewer::realize()
if (osg::DisplaySettings::instance()->getCompileContextsHint())
{
int numProcessors = osg::minimum(1, OpenThreads::GetNumberOfProcessors());
int numProcessors = osg::maximum(1, OpenThreads::GetNumberOfProcessors());
int processNum = 0;
for(unsigned int i=0; i<= osg::GraphicsContext::getMaxContextID(); ++i)