Khronos public bugtracker – Bug 720
Writing with compressed textures will always fail due to invalid parameters
Last modified: 2017-05-17 19:03:19 PDT
Writing a compressed texture to the KTX format with libktx 1.0.1 will always fail due to the following code in ktxWriteKTXF(): if (header.glTypeSize != sizeofGLtype(header.glType)) return KTX_INVALID_VALUE; According to the format standard a compressed texture shall have a glType value of 0 and a glTypeSize value of 1. The combination of values will always fail the test above. Removing the check and replacing it with the following one *after* compression has been detected should do the trick: if (!compressed && (header.glTypeSize != sizeofGLtype(header.glType))) return KTX_INVALID_VALUE;^M
Was fixed quite some time ago but this ticket was not closed.