Changeset 276 for experimental/TerrainTest
- Timestamp:
- Mar 20, 2011, 1:50:24 PM (14 years ago)
- Location:
- experimental/TerrainTest
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/TerrainTest/ModificationManager.cpp
r275 r276 53 53 terrain->setTerrainTechniquePrototype( geomTechnique ); 54 54 #ifdef USE_TERRAIN_PROTO_WORKAROUND 55 osg::ref_ptr<osgTerrain:: myTileLoadedCallback> tlcb = new osgTerrain::myTileLoadedCallback( terrain);55 osg::ref_ptr<osgTerrain::GeometryTechniquePrototypeWorkaroundTLC> tlcb = new osgTerrain::GeometryTechniquePrototypeWorkaroundTLC(); 56 56 osgTerrain::TerrainTile::setTileLoadedCallback(tlcb); 57 57 #endif -
experimental/TerrainTest/myTileLoadedCallback.h
r275 r276 1 1 #pragma once 2 2 #include <osgTerrain/TerrainTile> 3 #include "myTerrainTechnique.h"4 3 5 4 6 5 namespace osgTerrain { 7 6 8 class myTileLoadedCallback : public TerrainTile::TileLoadedCallback 7 template <class T> 8 class GeometryTechniquePrototypeWorkaroundTLC : public TerrainTile::TileLoadedCallback 9 9 { 10 10 public: 11 11 //! Constructor: Nothing to do. 12 myTileLoadedCallback() {};12 GeometryTechniquePrototypeWorkaroundTLC() {}; 13 13 14 14 //! Destructor: Nothing to do. 15 virtual ~ myTileLoadedCallback() {};15 virtual ~GeometryTechniquePrototypeWorkaroundTLC() {}; 16 16 17 17 /** … … 30 30 * @param options : Reader writer optins. Defined as interface, but in this class not used. 31 31 */ 32 virtual void loaded(osgTerrain::TerrainTile* tile, const osgDB::ReaderWriter::Options* options) const {tile->setTerrainTechnique( new osgTerrain::myTerrainTechnique() );};32 virtual void loaded(osgTerrain::TerrainTile* tile, const osgDB::ReaderWriter::Options* options) const {tile->setTerrainTechnique( new T() );}; 33 33 }; 34 34 -
experimental/TerrainTest/osgterrain.cpp
r275 r276 234 234 235 235 // Use Tile load Callback 236 osg::ref_ptr<osgTerrain:: myTileLoadedCallback> tlcb = new osgTerrain::myTileLoadedCallback();236 osg::ref_ptr<osgTerrain::GeometryTechniquePrototypeWorkaroundTLC<osgTerrain::myTerrainTechnique> > tlcb = new osgTerrain::GeometryTechniquePrototypeWorkaroundTLC<osgTerrain::myTerrainTechnique>(); 237 237 osgTerrain::TerrainTile::setTileLoadedCallback(tlcb); 238 238
Note: See TracChangeset
for help on using the changeset viewer.