libktx - The KTX Library
Revision History

Version 3.0.0


  • new API for reading KTX files without an OpenGL context.


  • ktx.h to not depend on KHR/khrplatform.h and GL{,ES*}/gl{corearb,}.h. Applications using OpenGL must now include these files themselves.
  • ktxLoadTexture[FMN], removing the hack of loading 1D textures as 2D textures when the OpenGL context does not support 1D textures. KTX_UNSUPPORTED_TEXTURE_TYPE is now returned.

Version 2.0.X


  • New build system

Version 2.0.1


  • CMake build files. Thanks to Pavel Rotjberg for the initial version.


  • ktxWriteKTXF to check the validity of the type & format combinations passed to it.


  • Public Bugzilla 999: 16-bit luminance texture cannot be written.
  • compile warnings from compilers stricter than MS Visual C++. Thanks to Pavel Rotjberg.

Version 2.0


  • support for decoding ETC2 and EAC formats in the absence of a hardware decoder.
  • support for converting textures with legacy LUMINANCE, LUMINANCE_ALPHA, etc. formats to the equivalent R, RG, etc. format with an appropriate swizzle, when loading in OpenGL Core Profile contexts.
  • ktxErrorString function to return a string corresponding to an error code.
  • tests for ktxLoadTexture[FN] that run under OpenGL ES 3.0 and OpenGL 3.3. The latter includes an EGL on WGL wrapper that makes porting apps between OpenGL ES and OpenGL easier on Windows.
  • more texture formats to ktxLoadTexture[FN] and toktx tests.


  • ktxLoadTexture[FMN] to discover the capabilities of the GL context at run time and load textures, or not, according to those capabilities.


  • failure of ktxWriteKTXF to pad image rows to 4 bytes as required by the KTX format.
  • ktxWriteKTXF exiting with KTX_FILE_WRITE_ERROR when attempting to write more than 1 byte of face-LOD padding.

Although there is only a very minor API change, the addition of ktxErrorString, the functional changes are large enough to justify bumping the major revision number.

Version 1.0.1

Implemented ktxLoadTextureM. Fixed the following:

  • Public Bugzilla 571: crash when null passed for pIsMipmapped.
  • Public Bugzilla 572: memory leak when unpacking ETC textures.
  • Public Bugzilla 573: potential crash when unpacking ETC textures with unused padding pixels.
  • Public Bugzilla 576: various small fixes.

Thanks to Krystian Bigaj for the ktxLoadTextureM implementation and these fixes.

Version 1.0

Initial release.