Changeset 255


Ignore:
Timestamp:
Feb 21, 2011, 8:26:43 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
experimental/TerrainTest
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • experimental/TerrainTest/ModificationVisitor.cpp

    r252 r255  
    99{
    1010        //OSG_NOTIFY( osg::ALWAYS ) << "ModVisitor: Node found: " << node.className() << std::endl;
     11
     12        if(std::string(node.className())=="TerrainTile")
     13        {
     14                OSG_NOTIFY( osg::ALWAYS ) << "ModVisitor: Tile found" << std::endl;
     15                modifyTile(node);
     16        }
     17
    1118        traverse( node );
    1219}
     
    2936        traverse( pNode );
    3037}
     38
     39void ModificationVisitor::modifyTile(osg::Node& node)
     40{
     41        OSG_NOTIFY( osg::ALWAYS ) << "ModificationVisitor::modifyTerrain()" << std::endl;
     42
     43       
     44
     45
     46
     47        OpenThreads::Thread::microSleep( 500000 );
     48}
  • experimental/TerrainTest/ModificationVisitor.h

    r252 r255  
    44#include <osg/NodeVisitor>
    55#include <osg/PagedLOD>
     6#include <osgTerrain/TerrainTile>
     7
    68
    79class ModificationVisitor : public osg::NodeVisitor
     
    1315
    1416private:
     17        void modifyTile(osg::Node& node);
    1518        std::string _extensionToSet;
    1619};
  • experimental/TerrainTest/ReaderWriterTerrainMod.cpp

    r254 r255  
    3737        node->accept( modVisitor );
    3838
    39         // Modify loaded terrain
    40         ReaderWriterTerrainMod* this_unconst = const_cast < ReaderWriterTerrainMod* > (this);
    41         this_unconst->modifyTerrain();
    42 
    4339        return node;
    44 }
    45 
    46 void ReaderWriterTerrainMod::modifyTerrain()
    47 {
    48         OSG_NOTIFY( osg::ALWAYS ) << "ReaderWriterTerrainMod::modifyTerrain()" << std::endl;
    49 
    50         //
    51         OpenThreads::Thread::microSleep( 500000 );
    5240}
    5341
  • experimental/TerrainTest/ReaderWriterTerrainMod.h

    r253 r255  
    1818
    1919private:
    20         void modifyTerrain();
    2120        std::string extensionToAdd;
    2221};
  • experimental/TerrainTest/myTerrainTechnique.cpp

    r250 r255  
    3636         //img->setInternalTextureFormat( GL_RGBA );
    3737
    38         if( img->getPixelFormat() == GL_RGBA )
     38        /* if( img->getPixelFormat() == GL_RGBA )
    3939                 OSG_ALWAYS << "Format ist RGBA" << std::endl;
    4040         if( img->getPixelFormat() == GL_RGB )
    4141                 OSG_ALWAYS << "Format ist RGB" << std::endl;
    4242          if( img->getPixelFormat() == GL_COMPRESSED_RGB_S3TC_DXT1_EXT )
    43                  OSG_ALWAYS << "Format ist GL_COMPRESSED_RGB_S3TC_DXT1_EXT" << std::endl;
     43                 OSG_ALWAYS << "Format ist GL_COMPRESSED_RGB_S3TC_DXT1_EXT" << std::endl;*/
    4444
    4545         
Note: See TracChangeset for help on using the changeset viewer.