Changeset 276 for experimental


Ignore:
Timestamp:
Mar 20, 2011, 1:50:24 PM (14 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
experimental/TerrainTest
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • experimental/TerrainTest/ModificationManager.cpp

    r275 r276  
    5353        terrain->setTerrainTechniquePrototype( geomTechnique );
    5454#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();
    5656        osgTerrain::TerrainTile::setTileLoadedCallback(tlcb);
    5757#endif
  • experimental/TerrainTest/myTileLoadedCallback.h

    r275 r276  
    11#pragma once
    22#include <osgTerrain/TerrainTile>
    3 #include "myTerrainTechnique.h"
    43
    54
    65namespace osgTerrain {
    76
    8 class  myTileLoadedCallback : public TerrainTile::TileLoadedCallback
     7template <class T>
     8class  GeometryTechniquePrototypeWorkaroundTLC : public TerrainTile::TileLoadedCallback
    99{
    1010public:
    1111        //! Constructor: Nothing to do.
    12         myTileLoadedCallback() {};
     12        GeometryTechniquePrototypeWorkaroundTLC() {};
    1313
    1414        //! Destructor: Nothing to do.
    15         virtual ~myTileLoadedCallback() {};
     15        virtual ~GeometryTechniquePrototypeWorkaroundTLC() {};
    1616
    1717        /**
     
    3030         * @param options : Reader writer optins. Defined as interface, but in this class not used.
    3131         */
    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() );};
    3333};
    3434
  • experimental/TerrainTest/osgterrain.cpp

    r275 r276  
    234234
    235235        // 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>();
    237237        osgTerrain::TerrainTile::setTileLoadedCallback(tlcb);
    238238
Note: See TracChangeset for help on using the changeset viewer.