cl ktx2

1.0.0

An implementation of the Khronos KTX Version 2 image file format

Table of Contents

About cl-ktx2

This is an implementation of the Khronos KTX2 image file format.

How To

Load the cl-ktx2 library, and invoke read-file to read a file from any of the supported binary-structures backends.

The returned structure can be easily accessed. Since the image data is already pre-packed for upload to the GPU, you should be able to just iterate over the level-images and upload via gl-tex-image-2d etc. Note that the gl-* functions return the direct enum integers that you can pass to the relevant functions.

The documentation on some of the fields, especially when dealing with the data format descriptors, is a bit sparse in this library. This is because these concepts are very complicated, and I'd just be repeating what the Khronos specifications say in other words, so please instead refer to the KTX2 Specification and the Khronos Data Format Specification for expanded descriptions on the various fields and data bits.

Note that this library does currently not implement any compression or encoding schemes that the format can contain. As such it is up to you to ensure that the data is interpreted and decoded in the correct way. Cl-ktx2 will simply hand you an opaque octet vector of the data. The same goes for creating files. If you want to create compressed image data, you will likely want to rely on tools like Khronos' own ktx-software, or Kram instead.

If you really want to use a pure Lisp workflow, please contribute the encoding and decoding algorithms :)

System Information

1.0.0
Yukari Hafner
zlib

Definition Index