Show
Ignore:
Timestamp:
04/10/03 21:32:32 (12 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/osgvertexprogram/osgvertexprogram.cpp

    r1844 r1856  
    406406    viewer.realize(); 
    407407 
     408    // now check to see if vertex program is supported. 
     409    for(unsigned int contextID = 0;  
     410        contextID<viewer.getDisplaySettings()->getMaxNumberOfGraphicsContexts(); 
     411        ++contextID) 
     412    { 
     413        osg::VertexProgram::Extensions* vpExt = osg::VertexProgram::getExtensions(contextID,false); 
     414        if (vpExt) 
     415        { 
     416            if (!vpExt->isVertexProgramSupported()) 
     417            { 
     418                cout<<"Warning: ARB_vertex_program not supported by OpenGL drivers, unable to run application."<<std::endl; 
     419                return 1; 
     420            } 
     421        } 
     422    } 
     423 
    408424    while( !viewer.done() ) 
    409425    {