#pragma once #include namespace osgTerrain { template class GeometryTechniquePrototypeWorkaroundTLC : public TerrainTile::TileLoadedCallback { public: //! Constructor: Nothing to do. GeometryTechniquePrototypeWorkaroundTLC() {}; //! Destructor: Nothing to do. virtual ~GeometryTechniquePrototypeWorkaroundTLC() {}; /** * \brief This function must be implemented. * * @return : Extrnal layer loading status. */ virtual bool deferExternalLayerLoading() const {return true;} /** * \brief This function is performed after every tile loading. * * It is used to install a custom geometryTechnique on every tile, because VPB databases older VPB 0.10 have a hardcoded geometryTechnique which ignores the GeometryTechniquePrototype of osgTerrain. * * @param tile : Loaded tile. * @param options : Reader writer options. Defined in the base class, but here not used. */ virtual void loaded(osgTerrain::TerrainTile* tile, const osgDB::ReaderWriter::Options* options) const {tile->setTerrainTechnique( new T() );}; }; } // Namespace end.