From 2464c76f6e2b8f5c01abd5d60c1ea01f36ba95b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 20 Nov 2020 18:33:42 +0100 Subject: [PATCH] GL: add a clarifying comment. --- src/Magnum/GL/CubeMapTexture.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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);