Remove use of init data for textures.

This commit is contained in:
kalbl
2016-10-18 18:02:14 +02:00
parent 8e972ff7d6
commit c555a96a09
7 changed files with 4 additions and 46 deletions

View File

@@ -49,11 +49,6 @@ return {
CameraMinHeight = 300,
InteractionDepthBelowEllipsoid = 0, -- Useful when having negative height map values
SegmentsPerPatch = 64,
TextureInitData = {
ColorTextureMinimumSize = 512,--512,
OverlayMinimumSize = 512,
HeightMapMinimumSize = 64,
},
Textures = {
ColorTextures = {
{

View File

@@ -34,11 +34,6 @@ return {
CameraMinHeight = 1000,
InteractionDepthBelowEllipsoid = 10000, -- Useful when having negative height map values
SegmentsPerPatch = 64,
TextureInitData = {
ColorTextureMinimumSize = 512,
OverlayMinimumSize = 512,
HeightMapMinimumSize = 64,
},
Textures = {
ColorTextures = {
{

View File

@@ -37,11 +37,6 @@ return {
CameraMinHeight = 300,
InteractionDepthBelowEllipsoid = 0, -- Useful when having negative height map values
SegmentsPerPatch = 64,
TextureInitData = {
ColorTextureMinimumSize = 512,
OverlayMinimumSize = 512,
HeightMapMinimumSize = 64,
},
Textures = {
ColorTextures = {
{

View File

@@ -22,11 +22,6 @@ return {
CameraMinHeight = 300,
InteractionDepthBelowEllipsoid = 5000, -- Useful when having negative height map values
SegmentsPerPatch = 64,
TextureInitData = {
ColorTextureMinimumSize = 512,--512,
OverlayMinimumSize = 512,
HeightMapMinimumSize = 64,
},
Textures = {
ColorTextures = {

View File

@@ -50,7 +50,6 @@ namespace {
"InteractionDepthBelowEllipsoid";
const std::string keyCameraMinHeight = "CameraMinHeight";
const std::string keySegmentsPerPatch = "SegmentsPerPatch";
const std::string keyTextureInitData = "TextureInitData";
const std::string keyTextures = "Textures";
const std::string keyColorTextures = "ColorTextures";
const std::string keyHeightMaps = "HeightMaps";
@@ -160,13 +159,10 @@ namespace globebrowsing {
_generalProperties.cameraMinHeight.set(cameraMinHeight);
// Init tile provider manager
ghoul::Dictionary textureInitDataDictionary;
ghoul::Dictionary texturesDictionary;
dictionary.getValue(keyTextureInitData, textureInitDataDictionary);
dictionary.getValue(keyTextures, texturesDictionary);
_tileProviderManager = std::make_shared<TileProviderManager>(
texturesDictionary, textureInitDataDictionary);
_tileProviderManager = std::make_shared<TileProviderManager>(texturesDictionary);
_chunkedLodGlobe = std::make_shared<ChunkedLodGlobe>(
*this, patchSegments, _tileProviderManager);

View File

@@ -72,8 +72,7 @@ namespace globebrowsing {
// Tile Provider Manager //
//////////////////////////////////////////////////////////////////////////////////////
TileProviderManager::TileProviderManager(
const ghoul::Dictionary& textureCategoriesDictionary,
const ghoul::Dictionary& textureInitDictionary){
const ghoul::Dictionary& textureCategoriesDictionary){
// Create all the categories of tile providers
for (size_t i = 0; i < textureCategoriesDictionary.size(); i++) {
ghoul::Dictionary texturesDict = textureCategoriesDictionary.value<ghoul::Dictionary>(
@@ -86,22 +85,7 @@ namespace globebrowsing {
TileProviderInitData initData;
if (i == LayeredTextures::ColorTextures ||
i == LayeredTextures::NightTextures ||
i == LayeredTextures::WaterMasks ||
i == LayeredTextures::GrayScaleOverlays) {
initData.minimumPixelSize = textureInitDictionary.value<double>("ColorTextureMinimumSize");
}
else if (i == LayeredTextures::Overlays) {
initData.minimumPixelSize = textureInitDictionary.value<double>("OverlayMinimumSize");
}
else if (i == LayeredTextures::HeightMaps) {
initData.minimumPixelSize = textureInitDictionary.value<double>("HeightMapMinimumSize");
}
else {
initData.minimumPixelSize = 512;
}
initData.minimumPixelSize = 512;
initData.threads = 1;
initData.cacheSize = 5000;
initData.framesUntilRequestQueueFlush = 60;

View File

@@ -62,9 +62,7 @@ namespace globebrowsing {
class TileProviderManager {
public:
TileProviderManager(
const ghoul::Dictionary& textureCategoriesDictionary,
const ghoul::Dictionary& textureInitDictionary);
TileProviderManager(const ghoul::Dictionary& textureCategoriesDictionary);
~TileProviderManager();
TileProviderGroup& getTileProviderGroup(size_t groupId);