Changeset 888
- Timestamp:
- 03/07/08 21:54:47
- Files:
-
- trunk/src/vpb/Destination.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/vpb/Destination.cpp
r886 r888 1054 1054 _stateset = new osg::StateSet; 1055 1055 1056 bool updateBaseTextureToCurrentValidImage = true; 1056 1057 osg::Texture* baseTexture = 0; 1057 1058 for(layerNum=0; … … 1078 1079 osg::Texture2D* texture = new osg::Texture2D; 1079 1080 1080 if ( baseTexture==0) baseTexture=texture;1081 if (updateBaseTextureToCurrentValidImage || baseTexture==0) baseTexture=texture; 1081 1082 1082 1083 texture->setImage(image); … … 1180 1181 // now fill in any blank texture units. 1181 1182 bool fillInAllTextureUnits = true; 1182 if (fillInAllTextureUnits && baseTexture)1183 if (fillInAllTextureUnits) 1183 1184 { 1184 1185 for(layerNum=0; … … 1191 1192 { 1192 1193 ImageData& imageData = _imagery[layerNum]; 1193 if (!imageData._imagery.valid() || 1194 !imageData._imagery->_image.valid()) applyBaseTexture=true; 1194 if (!imageData._imagery.valid() || !imageData._imagery->_image.valid()) 1195 { 1196 applyBaseTexture=true; 1197 } 1195 1198 } 1196 1199 if (applyBaseTexture) … … 1428 1431 1429 1432 osgTerrain::ImageLayer* baseLayer = 0; 1433 bool updateLayerTextureToCurrentValidLayer = true; 1430 1434 1431 1435 // assign the imagery … … 1445 1449 terrain->setColorLayer(layerNum, imageLayer); 1446 1450 1447 if ( !baseLayer)1451 if (updateLayerTextureToCurrentValidLayer || baseLayer==0) 1448 1452 { 1449 1453 baseLayer = imageLayer;
