Ignore:
Timestamp:
Nov 25, 2010, 8:51:38 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/TerrainTest/osgterrain.cpp

    r164 r165  
    3737
    3838#include "myTerrainTechnique.h"
     39#include "myTileLoadedCallback.h"
    3940
    4041#include <iostream>
     
    216217        terrain->setTerrainTechniquePrototype( myT );
    217218
    218         // Manually set the terrain technque for a tile ( his example, the first found tile) works, but then the whole database has to be processed
    219         osgTerrain::TerrainTile* tile = findTopMostNodeOfType<osgTerrain::TerrainTile>(rootnode);
    220         if(tile)
    221         {
    222                 tile->setTerrainTechnique( myT );
    223         }
     219        //// Manually set the terrain technque for a tile ( his example, the first found tile) works, but then the whole database has to be processed
     220        //osgTerrain::TerrainTile* tile = findTopMostNodeOfType<osgTerrain::TerrainTile>(rootnode);
     221        //if(tile)
     222        //{
     223        //      tile->setTerrainTechnique( myT );
     224        //}
     225
     226        // Use Tile load Callback
     227        osg::ref_ptr<osgTerrain::myTileLoadedCallback> tlcb = new osgTerrain::myTileLoadedCallback( terrain);
     228        osgTerrain::TerrainTile::setTileLoadedCallback(tlcb);
    224229
    225230    // register our custom handler for adjust Terrain settings
Note: See TracChangeset for help on using the changeset viewer.