From 2d9a4d5fa7dbd5ba1f5e73fdc353e08953e98f52 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 9 Mar 2005 22:01:15 +0000 Subject: [PATCH] Added support for writing base layer 0 texture into texture layer 1 and above to use as a background. --- src/osgTerrain/DataSet.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osgTerrain/DataSet.cpp b/src/osgTerrain/DataSet.cpp index 15105496f..a21bbe4f4 100644 --- a/src/osgTerrain/DataSet.cpp +++ b/src/osgTerrain/DataSet.cpp @@ -474,8 +474,9 @@ void DataSet::SourceData::readImage(DestinationData& destination) float destWindowWidthRatio = (float)destWidth/(float)windowWidth; float destWindowHeightRatio = (float)destHeight/(float)windowHeight; const float resizeTolerance = 1.1; - if (destWindowWidthRatio>resizeTolerance || - destWindowHeightRatio>resizeTolerance) + + bool interpolateSourceImagery = true; + if (interpolateSourceImagery && (destWindowWidthRatio>resizeTolerance || destWindowHeightRatio>resizeTolerance)) { readWidth = windowWidth; readHeight = windowHeight;