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:
Robert Osfield
2007-07-17 10:54:17 +00:00
parent 610a76b210
commit 04c1dee7a2
3 changed files with 76 additions and 22 deletions

View File

@@ -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();
}