Fixed GraphcicsContext::getMaxContextID so it properly returns the current max contextID.
Fixed the osgviewer's compile context code to account for the above fix. Added compile context support into osgterrain example.
This commit is contained in:
@@ -157,7 +157,7 @@ int main(int argc, char** argv)
|
||||
int numProcessors = OpenThreads::GetNumberOfProcessors();
|
||||
int processNum = 0;
|
||||
|
||||
for(unsigned int i=0; i<osg::GraphicsContext::getMaxContextID(); ++i)
|
||||
for(unsigned int i=0; i<= osg::GraphicsContext::getMaxContextID(); ++i)
|
||||
{
|
||||
osg::GraphicsContext* gc = osg::GraphicsContext::getOrCreateCompileContext(i);
|
||||
|
||||
@@ -172,6 +172,6 @@ int main(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
viewer.run();
|
||||
viewer.run();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user