Added tests for presense of extensions to osgcubemap, osgvertexproram and

osgmultitexture examples.

Added osg::VertexProgram::Extensions class to better handle multiple graphics
context vertex program extensions.
This commit is contained in:
Robert Osfield
2003-04-10 19:32:32 +00:00
parent 52d2d8eaff
commit aaa761e333
8 changed files with 225 additions and 24 deletions

View File

@@ -101,6 +101,21 @@ int main( int argc, char **argv )
// create the windows and run the threads.
viewer.realize();
for(unsigned int contextID = 0;
contextID<viewer.getDisplaySettings()->getMaxNumberOfGraphicsContexts();
++contextID)
{
osg::Texture::Extensions* textExt = osg::Texture::getExtensions(contextID,false);
if (textExt)
{
if (!textExt->isMultiTexturingSupported())
{
cout<<"Warning: texture_cube_map not supported by OpenGL drivers, unable to run application."<<std::endl;
return 1;
}
}
}
while( !viewer.done() )
{
// wait for all cull and draw threads to complete.