Changeset 6004 for geovis


Ignore:
Timestamp:
Feb 11, 2016 10:39:04 PM (8 years ago)
Author:
ldelgass
Message:

Add define for testing new rex terrain engine

Location:
geovis/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • geovis/trunk/Makefile.in

    r5973 r6004  
    66USE_READ_THREAD         = #yes
    77USE_CACHE               = yes
    8 USE_OSGEARTH_TRUNK      = #yes
    98USE_THROTTLING_SLEEP    = #yes
    109SLEEP_AFTER_QUEUE_FRAME = yes
    1110QUEUE_ONLY_ONE_FRAME    = yes
     11USE_REX                 = #yes
    1212
    1313bindir          = @bindir@
     
    106106DEFINES         += -DUSE_CACHE
    107107endif
    108 ifdef USE_OSGEARTH_TRUNK
    109 DEFINES         += -DUSE_OSGEARTH_TRUNK
    110 endif
    111108ifdef USE_THROTTLING_SLEEP
    112109DEFINES         += -DUSE_THROTTLING_SLEEP
     
    117114ifdef QUEUE_ONLY_ONE_FRAME
    118115DEFINES         += -DQUEUE_ONLY_ONE_FRAME
     116endif
     117ifdef USE_REX
     118DEFINES         += -DUSE_REX
    119119endif
    120120
  • geovis/trunk/Renderer.cpp

    r6002 r6004  
    8686#include <osgEarthDrivers/gdal/GDALOptions>
    8787#include <osgEarthDrivers/engine_mp/MPTerrainEngineOptions>
     88#ifdef USE_REX
     89#include <osgEarthDrivers/engine_rex/RexTerrainEngineOptions>
     90#endif
    8891
    8992#include "Renderer.h"
     
    808811    bopts.url() = getBaseImage();
    809812    addImageLayer("base", bopts);
    810     osgEarth::Drivers::MPTerrainEngine::MPTerrainEngineOptions mpOpt;
     813#ifdef USE_REX
     814    osgEarth::Drivers::RexTerrainEngine::RexTerrainEngineOptions engineOpt;
     815#else
     816    osgEarth::Drivers::MPTerrainEngine::MPTerrainEngineOptions engineOpt;
     817#endif
    811818    // Set background layer color
    812     mpOpt.color() = bgColor;
    813     //mpOpt.minLOD() = 1;
     819    engineOpt.color() = bgColor;
     820    //engineOpt.minLOD() = 1;
    814821    // Sets shader uniform for terrain renderer (config var defaults to false)
    815822    if (!_map->isGeocentric()) {
    816         mpOpt.enableLighting() = false;
    817     }
    818     osgEarth::MapNodeOptions mapNodeOpts(mpOpt);
     823        engineOpt.enableLighting() = false;
     824    }
     825    osgEarth::MapNodeOptions mapNodeOpts(engineOpt);
    819826    // Sets GL_LIGHTING state in MapNode's StateSet (config var defaults to true)
    820827    //mapNodeOpts.enableLighting() = true;
Note: See TracChangeset for help on using the changeset viewer.