Changeset 4643 for geovis/trunk/Renderer.cpp
- Timestamp:
- Oct 3, 2014, 1:18:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
geovis/trunk/Renderer.cpp
r4636 r4643 50 50 #include <osgEarthAnnotation/ScaleDecoration> 51 51 #include <osgEarthUtil/EarthManipulator> 52 #if defined(USE_OSGEARTH_TRUNK) ||OSGEARTH_MIN_VERSION_REQUIRED(2, 5, 1)52 #if OSGEARTH_MIN_VERSION_REQUIRED(2, 5, 1) 53 53 #include <osgEarthUtil/Sky> 54 #include <osgEarthDrivers/sky_simple/SimpleSkyOptions> 54 55 #else 55 56 #include <osgEarthUtil/SkyNode> … … 406 407 _hbox->addControl(_scaleLabel.get()); 407 408 _hbox->addControl(_scaleBar.get()); 408 #if def USE_OSGEARTH_TRUNK409 #if OSGEARTH_MIN_VERSION_REQUIRED(2, 5, 1) 409 410 osgEarth::Util::Controls::ControlCanvas::getOrCreate(_viewer.get())->addControl(_hbox.get()); 410 411 #else … … 488 489 osgEarth::Util::Controls::LabelControl *readout = 489 490 _coordsCallback->getLabel(); 490 #if def USE_OSGEARTH_TRUNK491 #if OSGEARTH_MIN_VERSION_REQUIRED(2, 5, 1) 491 492 osgEarth::Util::Controls::ControlCanvas::getOrCreate(_viewer.get())->removeControl(readout); 492 493 #else … … 537 538 } else { 538 539 readout = new osgEarth::Util::Controls::LabelControl("", 12.0f); 539 #if def USE_OSGEARTH_TRUNK540 #if OSGEARTH_MIN_VERSION_REQUIRED(2, 5, 1) 540 541 osgEarth::Util::Controls::ControlCanvas::getOrCreate(_viewer.get())->addControl(readout); 541 542 #else … … 691 692 bopts.url() = getBaseImage(); 692 693 addImageLayer("base", bopts); 693 #if def USE_OSGEARTH_TRUNK694 #if OSGEARTH_MIN_VERSION_REQUIRED(2, 5, 1) 694 695 osgEarth::Drivers::MPTerrainEngine::MPTerrainEngineOptions mpOpt; 695 696 #else … … 704 705 // Sets GL_LIGHTING state in MapNode's StateSet (config var defaults to true) 705 706 mapNodeOpts.enableLighting() = true; 707 //mapNodeOpts.getTerrainOptions().loadingPolicy().mapLoadingThreadsPerCore() = 1; 708 //mapNodeOpts.getTerrainOptions().loadingPolicy().numLoadingThreads() = 1; 709 //mapNodeOpts.getTerrainOptions().loadingPolicy().numCompileThreadsPerCore() = 1; 710 //mapNodeOpts.getTerrainOptions().loadingPolicy().numCompileThreads() = 1; 706 711 osgEarth::MapNode *mapNode = new osgEarth::MapNode(map, mapNodeOpts); 707 712 _mapNode = mapNode; 708 713 if (_map->isGeocentric()) { 709 714 osgEarth::DateTime now; 710 #if defined(USE_OSGEARTH_TRUNK) ||OSGEARTH_MIN_VERSION_REQUIRED(2, 5, 1)715 #if OSGEARTH_MIN_VERSION_REQUIRED(2, 5, 1) 711 716 TRACE("Creating SkyNode"); 712 osgEarth::Util::SkyOptions skyOpts; 713 skyOpts.setDriver("gl"); 717 osgEarth::Drivers::SimpleSky::SimpleSkyOptions skyOpts; 714 718 skyOpts.hours() = now.hours(); 715 719 skyOpts.ambient() = 0.2f; 720 skyOpts.atmosphericLighting() = true; 721 skyOpts.exposure() = 3.0; 716 722 osgEarth::Util::SkyNode *sky = osgEarth::Util::SkyNode::create(skyOpts, mapNode); 717 723 sky->addChild(mapNode); … … 1079 1085 } 1080 1086 osgEarth::ImageLayerOptions layerOpts(name, opts); 1081 #if def USE_OSGEARTH_TRUNK1087 #if OSGEARTH_MIN_VERSION_REQUIRED(2, 5, 1) 1082 1088 layerOpts.textureCompression() = osg::Texture::USE_IMAGE_DATA_FORMAT; 1083 1089 #endif
Note: See TracChangeset
for help on using the changeset viewer.