Show
Ignore:
Timestamp:
04/10/03 21:32:32 (11 years ago)
Author:
robert
Message:

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.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgcubemap/osgcubemap.cpp

    r1844 r1856  
    130130    viewer.realize(); 
    131131 
     132 
     133    // now check to see if texture cube map is supported. 
     134    for(unsigned int contextID = 0;  
     135        contextID<viewer.getDisplaySettings()->getMaxNumberOfGraphicsContexts(); 
     136        ++contextID) 
     137    { 
     138        osg::TextureCubeMap::Extensions* tcmExt = osg::TextureCubeMap::getExtensions(contextID,false); 
     139        if (tcmExt) 
     140        { 
     141            if (!tcmExt->isCubeMapSupported()) 
     142            { 
     143                cout<<"Warning: texture_cube_map not supported by OpenGL drivers, unable to run application."<<std::endl; 
     144                return 1; 
     145            } 
     146        } 
     147    } 
     148 
    132149    while( !viewer.done() ) 
    133150    {