Show
Ignore:
Timestamp:
04/10/03 15:41:45 (12 years ago)
Author:
robert
Message:

Added support for modifying the osg::Texture*:Extensions stuctures.

Added an example modifying osg::Texture::Extensions to osgtext. Optionally
compiled out by default.

Files:
1 modified

Legend:

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

    r1844 r1854  
    517517    viewer.setSceneData(rootNode.get()); 
    518518 
     519 
    519520    // create the windows and run the threads. 
    520521    viewer.realize(); 
    521522 
     523#if 0 
     524    // this optional compile block is done as a test against graphics 
     525    // drivers that claim support for generate mip map, but the actual 
     526    // implementation is flacky.  It is not compiled by default. 
     527 
     528    // go through each graphics context and switch off the generate mip map extension. 
     529    // note, this must be done after the realize so that init of texture state and as  
     530    // result extension structures have been iniatilized. 
     531    for(unsigned int contextID = 0;  
     532        contextID<viewer.getDisplaySettings()->getMaxNumberOfGraphicsContexts(); 
     533        ++contextID) 
     534    { 
     535        osg::Texture::Extensions* textureExt = osg::Texture::getExtensions(contextID,false); 
     536        if (textureExt) textureExt->setGenerateMipMapSupported(false); 
     537    } 
     538#endif 
     539     
    522540    while( !viewer.done() ) 
    523541    {