Khronos Data Format Specification
C TeX XSLT CSS Makefile HTML JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
dblatex
headers
images
out
Makefile
README.adoc
astc.txt
bptc.txt
colormodels.txt
compformats.txt
conversionintro.txt
conversions.txt
df-docinfo.xml
df.txt
etc1.txt
etc2.txt
htmltitle.txt
inlinecss.pl
inlineimages.pl
pdftitle.txt
primaries.txt
quantization.txt
references.txt
rgtc.txt
s3tc.txt
transferfunctions.txt

README.adoc

Khronos Data Format Specification

This repository contains source for the Khronos Data Format Specification.

The Khronos Data Format Specification describes a portable mechanism for describing a wide range of image/texture formats and other forms of data. It solely describes the format of what may be considered to be a single "pixel" or a repeating group of pixels considered to be a "texture block".

A wide variety of incompatible mechanisms exist in the industry for describing formats that may be supported by an API. These mechanisms typically consist of a simple enumeration, and need retrospectively supplementing by metadata. It is therefore common for generic code which can handle multiple ormats to require multiple large switch statements to distinguish different features of the formats that it supports, and for the handling of image metadata to be awkward or incomplete. The intent of this specification is to provide a machine-readable and precise description that directly incorporates most common metadata, while being extensible to specific needs.

This specification also contains a detailed description of the in-memory representation of a number of compressed texture formats, and describes some common color spaces.

Building the Specification

The build system relies on asciidoc, which is available as part of many Linux distributions. The PDF build subsequently depends on dblatex.

All forms of the specification may be built with a simple "make" or "make all" command, with an output into the "out" directory.

Use "make pdf" to build just the PDF specification.

Use "make html" to build the HTML version of the specification without inline images, which are accessed from the "out" directory; this is smaller than the "inlinehtml" version.

Use "make inlinehtml" to create the HTML and then generate a version with inlined images, allowing it to be transferred as a single file; note that the HTML still relies on access to MathJax and is therefore not completely stand-alone. This build option requires PERL.

"make header" copies the header file into the "out/headers" directory.

"make clean" removes the contents out "out" and temporary files.