diff --git a/src/Magnum/GL/CubeMapTexture.cpp b/src/Magnum/GL/CubeMapTexture.cpp index 1fbd8c10b..d19bcdbca 100644 --- a/src/Magnum/GL/CubeMapTexture.cpp +++ b/src/Magnum/GL/CubeMapTexture.cpp @@ -128,6 +128,10 @@ void CubeMapTexture::compressedImage(const Int level, CompressedImage3D& image) the compression, we need to ask GL for it */ std::pair dataOffsetSize; if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) { + /* Unlike in AbstractTexture::compressedImage(), here we have a + separate offset and size because of the + nv-cubemap-broken-full-compressed-image-query workaround, where it + needs to go slice-by-slice, advancing the offset each time */ dataOffsetSize.first = 0; dataOffsetSize.second = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level)*6; } else dataOffsetSize = Magnum::Implementation::compressedImageDataOffsetSizeFor(image, size); @@ -164,6 +168,10 @@ void CubeMapTexture::compressedImage(const Int level, const MutableCompressedIma the compression, we need to ask GL for it */ std::pair dataOffsetSize; if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) { + /* Unlike in AbstractTexture::compressedImage(), here we have a + separate offset and size because of the + nv-cubemap-broken-full-compressed-image-query workaround, where it + needs to go slice-by-slice, advancing the offset each time */ dataOffsetSize.first = 0; dataOffsetSize.second = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level)*6; } else dataOffsetSize = Magnum::Implementation::compressedImageDataOffsetSizeFor(image, size); @@ -194,6 +202,10 @@ void CubeMapTexture::compressedImage(const Int level, CompressedBufferImage3D& i the compression, we need to ask GL for it */ std::pair dataOffsetSize; if(!image.storage().compressedBlockSize().product() || !image.storage().compressedBlockDataSize()) { + /* Unlike in AbstractTexture::compressedImage(), here we have a + separate offset and size because of the + nv-cubemap-broken-full-compressed-image-query workaround, where it + needs to go slice-by-slice, advancing the offset each time */ dataOffsetSize.first = 0; dataOffsetSize.second = (this->*Context::current().state().texture->getCubeLevelCompressedImageSizeImplementation)(level)*6; } else dataOffsetSize = Magnum::Implementation::compressedImageDataOffsetSizeFor(image, size);