Changeset 9041

Show
Ignore:
Timestamp:
10/21/08 17:51:56 (6 years ago)
Author:
robert
Message:

#if'd out an premature StateSet? optimization that was causing problems with datasets that mixed multi-texture coord geometry with single texture coord geometries in a single scene graph.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/GeometryRecords.cpp

    r7756 r9041  
    393393        } 
    394394 
     395#if 0 
     396// note from Robert Osfield, this "optimization" breaks multi-textured datasets that mix single texture  
     397// and mulit-texture geometries as the Multitexture parsing can come after the below code, and accidentally  
     398// polute the non multi-texture geometries StateSet. 
     399 
    395400        // A simple share stateset optimization. 
    396401        static osg::ref_ptr<osg::StateSet> lastStateset; 
     
    399404        else 
    400405            lastStateset = stateset; 
     406#endif 
    401407 
    402408        _geode->setStateSet(stateset.get()); 
     
    956962        } 
    957963 
     964#if 0 
     965// note from Robert Osfield, this "optimization" breaks multi-textured datasets that mix single texture  
     966// and mulit-texture geometries as the Multitexture parsing can come after the below code, and accidentally  
     967// polute the non multi-texture geometries StateSet. 
     968 
    958969        // A simple share stateset optimization. 
    959970        static osg::ref_ptr<osg::StateSet> lastStateset; 
     
    962973        else 
    963974            lastStateset = stateset; 
     975#endif 
    964976 
    965977        _geode->setStateSet(stateset.get());