Changeset 5877 for geovis/trunk/Renderer.cpp
- Timestamp:
- Sep 21, 2015, 4:23:24 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
geovis/trunk/Renderer.cpp
r5876 r5877 1305 1305 bool makeShared, 1306 1306 bool visible, 1307 int minLOD,int maxLOD)1307 unsigned int minLOD, unsigned int maxLOD) 1308 1308 { 1309 1309 if (!_map.valid()) { … … 1465 1465 bool enableCache, 1466 1466 bool visible, 1467 int minLOD,int maxLOD)1467 unsigned int minLOD, unsigned int maxLOD) 1468 1468 { 1469 1469 if (!_map.valid()) { … … 2000 2000 } 2001 2001 #endif 2002 void Renderer::addModelLayer(const char *name, osgEarth::ModelSourceOptions& opts) 2002 void Renderer::addModelLayer(const char *name, 2003 osgEarth::ModelSourceOptions& opts, 2004 bool enableCache, 2005 bool lighting, 2006 bool visible) 2003 2007 { 2004 2008 if (!_map.valid()) { … … 2008 2012 TRACE("layer: %s", name); 2009 2013 osgEarth::ModelLayerOptions layerOpts(name, opts); 2014 if (!enableCache) { 2015 TRACE("Disabling cache for layer %s", name); 2016 layerOpts.cachePolicy() = osgEarth::CachePolicy(osgEarth::CachePolicy::USAGE_NO_CACHE); 2017 } 2018 if (!visible) { 2019 layerOpts.visible() = false; 2020 } 2021 layerOpts.lightingEnabled() = lighting; 2010 2022 _map->addModelLayer(new osgEarth::ModelLayer(layerOpts)); 2011 2023 _needsRedraw = true;
Note: See TracChangeset
for help on using the changeset viewer.