KTX (Khronos Texture) Library and Tools
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
Note: Visual Studio 2019 v16.5 & v16.6 get an internal compiler error when compiling parts of this software. v16.4 is okay. For Windows we suggest using Visual Studio 2017 until Microsoft fixes this bug.
Note: This repo has just switched from a GYP-based to a CMake-based build system. The pre-generated build files have been removed but the .gyp files will remain available for a while and can be used to generate build files, using the GNUMakefile in the root of the project, in the event of a problem. You will have to install GYP.
This is the official home of the source code for the Khronos KTX library and tools.
KTX (Khronos Texture) is a lightweight container for textures for OpenGL®, Vulkan® and other GPU APIs. KTX files contain all the parameters needed for texture loading. A single file can contain anything from a simple base-level 2D texture through to a cubemap array texture with mipmaps. Contained textures can be in a Basis Universal format, in any of the block-compressed formats supported by OpenGL family and Vulkan APIs and extensions or in an uncompressed single-plane format. Basis Universal currently encompasses two formats that can be quickly transcoded to any GPU-supported format: LZ/ETC1S, which combines block-compression and supercompression, and UASTC, a block-compressed format. Formats other than LZ/ETC1S can be supercompressed with Zstd.
The software consists of: (links are to source folders in the KhronosGroup repo)
See the Doxygen generated live documentation for API and tool usage information.
See CONTRIBUTING for information about contributing.
See LICENSE for information about licensing.
See BUILDING for information about building the code.
IMPORTANT: you must install the Git LFS command line extension in order to fully checkout this repository after cloning. You need at least version 1.1. If you did not have Git LFS installed at first checkout then, after installing it, you must run
git lfs checkout
A few files have
$Date$keywords. If you care about having the proper dates shown or will be generating the documentation or preparing distribution archives, you must follow the instructions below.
$Date$ keywords are expanded via a smudge & clean filter. To install the filter, issue the following commands in the root of your clone.
On Unix (Linux, Mac OS X, etc.) platforms and Windows using Git for Windows' Git Bash or Cygwin's bash terminal:
./install-gitconfig.sh rm TODO.md lib/mainpage.md pkgdoc/pages.md tools/toktx/toktx.cc git checkout TODO.md lib/mainpage.md pkgdoc/pages.md tools/toktx/toktx.cc
On Windows with the Command Prompt (requires
git.exein a directory on your %PATH%):
install-gitconfig.bat del TODO.md TODO.md lib\mainpage.md pkgdoc\pages.md tools\toktx\toktx.cc git TODO.md lib\mainpage.md pkgdoc\pages.md tools\toktx\toktx.cc
The first command adds an [include] of the repo's
.gitconfigto the local git config file
.git/config, i.e. the one in your clone of the repo.
.gitconfigcontains the config of the "keyworder" filter. The remaining commands force a new checkout of the affected files to smudge them with the date. These two are unnecessary if you plan to edit these files.