From 29641ba69a2454e01d736eb3fbd4bcc02c319bbc Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 26 Apr 2017 10:55:55 -0700 Subject: [PATCH] Fix min mip not being written to ktx correctly --- libraries/gpu/src/gpu/Texture_ktx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gpu/src/gpu/Texture_ktx.cpp b/libraries/gpu/src/gpu/Texture_ktx.cpp index b2b08ca170..6fe07d4241 100644 --- a/libraries/gpu/src/gpu/Texture_ktx.cpp +++ b/libraries/gpu/src/gpu/Texture_ktx.cpp @@ -207,7 +207,7 @@ void KtxStorage::assignMipData(uint16 level, const storage::StoragePointer& stor memcpy(data, storage->data(), _ktxDescriptor->images[level]._imageSize); _minMipLevelAvailable = level; if (offset > 0) { - memcpy(file->mutableData() + ktx::KTX_HEADER_SIZE + offset, (void*)&_minMipLevelAvailable, 1); + memcpy(file->mutableData() + ktx::KTX_HEADER_SIZE + 4 + offset, (void*)&_minMipLevelAvailable, 1); } } }