mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-07 12:10:52 -06:00
Remove use of init data for textures.
This commit is contained in:
@@ -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 = {
|
||||
{
|
||||
|
||||
@@ -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 = {
|
||||
{
|
||||
|
||||
@@ -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 = {
|
||||
{
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user