Solve problem with too big texture tiles requested.

This commit is contained in:
Kalle Bladin
2016-05-13 20:27:30 -04:00
parent c4c65c98d8
commit 6ddec421b7
3 changed files with 4 additions and 3 deletions

View File

@@ -96,7 +96,7 @@ namespace openspace {
colorTextureDictionary.getValue("FilePath", path);
std::shared_ptr<TileProvider> colorTextureProvider =
std::shared_ptr<TileProvider>(new TileProvider(
path, 5000, 1024));
path, 5000, 512));
_tileProviderManager->addColorTexture(name, colorTextureProvider);
}
@@ -113,7 +113,7 @@ namespace openspace {
heightMapDictionary.getValue("FilePath", path);
std::shared_ptr<TileProvider> heightMapProvider =
std::shared_ptr<TileProvider>(new TileProvider(
path, 5000, 256));
path, 5000, 128));
_tileProviderManager->addHeightMap(name, heightMapProvider);
}

View File

@@ -52,6 +52,7 @@ namespace openspace {
int nRasters = dataSet->GetRasterCount();
ghoul_assert(nRasters > 0, "Bad dataset. Contains no rasterband.");
ghoul_assert(chunkIndex.level > 0, "Level of chunk index must be bigger than 0.");
GDALRasterBand* firstBand = dataSet->GetRasterBand(1);

View File

@@ -153,7 +153,7 @@ namespace openspace {
break;
}
if (!chunkIndex.hasParent()) {
if (chunkIndex.level <= 1) {
tex = getDefaultTexture();
break;
}