Changeset 13501

Show
Ignore:
Timestamp:
10/21/14 17:10:27 (10 days ago)
Author:
robert
Message:

Added shaders to support experimental shader based displacement mapping technique osgTerrain::ShaderTerrain?.

Location:
OpenSceneGraph/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgUtil/Optimizer

    r13041 r13501  
    258258        /** Flatten Static Transform nodes by applying their transform to the 
    259259          * geometry on the leaves of the scene graph, then removing the 
    260           * now redundant transforms.  Static transformed Subgraphs that have multiple 
     260          * now redundant transforms.  Static transformed subgraphs that have multiple 
    261261          * parental paths above them are not flattened, if you require this then 
    262262          * the subgraphs have to be duplicated - for this use the 
     
    293293        }; 
    294294 
    295         /** FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor is similar to 
    296           * to FlattenStaticTransformsVisitor in that is desgined to remove static transforms 
     295        /** FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor is similar 
     296          * to FlattenStaticTransformsVisitor in that it is designed to remove static transforms 
    297297          * from the scene graph, pushing down the transforms to the geometry leaves of the scene graph, 
    298298          * but with the difference that any subgraphs that are shared between different transforms 
    299           * of duplicated and flatten individually.  This results in more static transforms 
     299          * are duplicated and flattened individually.  This results in more static transforms 
    300300          * being removed, but also means that more data is generated, and as a result may 
    301301          * not always be the most appropriate flatten visitor to use.*/ 
     
    795795        /** Optimize texture usage in the scene graph by combining textures into texture atlas 
    796796          * Use of texture atlas cuts down on the number of seperate states in the scene, reducing 
    797           * state changes and improving the chances of use larger batches of geomertry.*/ 
     797          * state changes and improving the chances of using larger batches of geometry.*/ 
    798798        class OSGUTIL_EXPORT TextureAtlasVisitor : public BaseOptimizerVisitor 
    799799        { 
  • OpenSceneGraph/trunk/src/osgUtil/Optimizer.cpp

    r13488 r13501  
    5151using namespace osgUtil; 
    5252 
    53 // #define GEOMETRYDEPRECATED                 
     53// #define GEOMETRYDEPRECATED 
    5454 
    5555void Optimizer::reset() 
     
    259259        } while (result); 
    260260 
    261         // no combine any adjacent static transforms. 
     261        // now combine any adjacent static transforms. 
    262262        CombineStaticTransformsVisitor cstv(this); 
    263263        node->accept(cstv); 
     
    269269        OSG_INFO<<"Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS"<<std::endl; 
    270270 
    271         // no combine any adjacent static transforms. 
     271        // now combine any adjacent static transforms. 
    272272        FlattenStaticTransformsDuplicatingSharedSubgraphsVisitor fstdssv(this); 
    273273        node->accept(fstdssv); 
     
    12851285    if (nodeWeCannotRemove && nodeWeCannotRemove->asTransform()!=0 && nodeWeCannotRemove->asTransform()->asMatrixTransform()!=0) 
    12861286    { 
    1287         // remove topmost node if it exists in the transform set. 
     1287        // remove topmost node from transform set if it exists there. 
    12881288        TransformSet::iterator itr = _transformSet.find(nodeWeCannotRemove->asTransform()->asMatrixTransform()); 
    12891289        if (itr!=_transformSet.end()) _transformSet.erase(itr);