Do not use padding for temporal VIIRS for faster loading

This commit is contained in:
Kalle Bladin
2017-08-08 15:49:27 +02:00
parent 1265de0d50
commit 559a8063bc
11 changed files with 33 additions and 18 deletions

View File

@@ -28,13 +28,14 @@
namespace openspace::globebrowsing {
const glm::ivec2 TileTextureInitData::TilePixelStartOffset = glm::ivec2(-2);
const glm::ivec2 TileTextureInitData::TilePixelSizeDifference = glm::ivec2(4);
const glm::ivec2 TileTextureInitData::TilePixelStartOffset = glm::ivec2(-1);
const glm::ivec2 TileTextureInitData::TilePixelSizeDifference = glm::ivec2(2);
TileTextureInitData::TileTextureInitData(size_t width, size_t height, GLenum glType,
Format textureFormat, bool padTiles, ShouldAllocateDataOnCPU shouldAllocateDataOnCPU)
: _glType(glType)
, _ghoulTextureFormat(textureFormat)
, _padTiles(padTiles)
, _shouldAllocateDataOnCPU(shouldAllocateDataOnCPU)
{
_tilePixelStartOffset = padTiles ? TilePixelStartOffset : glm::ivec2(0);
@@ -59,6 +60,7 @@ TileTextureInitData::TileTextureInitData(const TileTextureInitData& original)
original.dimensionsWithoutPadding().y,
original.glType(),
original.ghoulTextureFormat(),
original._padTiles,
original.shouldAllocateDataOnCPU() ? ShouldAllocateDataOnCPU::Yes : ShouldAllocateDataOnCPU::No)
{ };