Declares the public functions and structures of the KTX API. More...
#include <stdio.h>
#include <stdint.h>
Data Structures | |
class | ktxTexture |
Class representing a texture. More... | |
struct | ktxTextureCreateInfo |
Structure for passing texture information to ktxTexture_Create(). More... | |
struct | KTX_dimensions |
Structure used by load functions to return texture dimensions. More... | |
struct | KTX_texture_info |
Structure to pass texture information to ktxWriteKTX. More... | |
struct | KTX_image_info |
Structure used to pass image data to ktxWriteKTX. More... | |
Macros | |
#define | KTX_ORIENTATION_KEY "KTXorientation" |
Key String for standard orientation value. | |
#define | KTX_ORIENTATION2_FMT "S=%c,T=%c" |
Standard format for 2D orientation value. | |
#define | KTX_ORIENTATION3_FMT "S=%c,T=%c,R=%c" |
Standard format for 3D orientation value. | |
#define | KTX_GL_UNPACK_ALIGNMENT 4 |
Required unpack alignment. | |
#define | ktxHashTable_Destroy(a) ktxHashList_Destroy(a); |
Destroy a KTX_hash_table. More... | |
#define | ktxHashTable_AddKVPair(a, b, c, d) ktxHashList_AddKVPair(a, b, c, d) |
Add a key-value pair to a KTX_hash_table. More... | |
#define | ktxHashTable_FindValue(a, b, c, d) ktxHashList_FindValue(a, b, c, d) |
Looks up a key and returns its value. More... | |
Typedefs | |
typedef enum KTX_error_code_t | ktxResult |
Result codes returned by library functions. | |
Enumerations | |
enum | KTX_error_code { KTX_SUCCESS = 0, KTX_FILE_DATA_ERROR, KTX_FILE_OPEN_FAILED, KTX_FILE_OVERFLOW, KTX_FILE_READ_ERROR, KTX_FILE_SEEK_ERROR, KTX_FILE_UNEXPECTED_EOF, KTX_FILE_WRITE_ERROR, KTX_GL_ERROR, KTX_INVALID_OPERATION, KTX_INVALID_VALUE, KTX_NOT_FOUND, KTX_OUT_OF_MEMORY, KTX_UNKNOWN_FILE_FORMAT, KTX_UNSUPPORTED_TEXTURE_TYPE } |
Error codes returned by library functions. More... | |
Functions | |
KTX_error_code | ktxLoadTextureF (FILE *, GLuint *pTexture, GLenum *pTarget, KTX_dimensions *pDimensions, GLboolean *pIsMipmapped, GLenum *pGlerror, unsigned int *pKvdLen, unsigned char **ppKvd) |
Create a GL texture object from KTX data in a stdio FILE stream. More... | |
KTX_error_code | ktxLoadTextureN (const char *const filename, GLuint *pTexture, GLenum *pTarget, KTX_dimensions *pDimensions, GLboolean *pIsMipmapped, GLenum *pGlerror, unsigned int *pKvdLen, unsigned char **ppKvd) |
Create a GL texture object from KTX data in a named file on disk. More... | |
KTX_error_code | ktxLoadTextureM (const void *bytes, GLsizei size, GLuint *pTexture, GLenum *pTarget, KTX_dimensions *pDimensions, GLboolean *pIsMipmapped, GLenum *pGlerror, unsigned int *pKvdLen, unsigned char **ppKvd) |
Create a GL texture object from KTX formatted data in memory. More... | |
KTX_error_code | ktxWriteKTXF (FILE *dst, const KTX_texture_info *imageInfo, GLsizei bytesOfKeyValueData, const void *keyValueData, GLuint numImages, KTX_image_info images[]) |
Write image(s) in KTX format to a stdio FILE stream. More... | |
KTX_error_code | ktxWriteKTXN (const char *dstname, const KTX_texture_info *imageInfo, GLsizei bytesOfKeyValueData, const void *keyValueData, GLuint numImages, KTX_image_info images[]) |
Write image(s) in KTX format to a file on disk. More... | |
KTX_error_code | ktxWriteKTXM (unsigned char **dst, GLsizei *size, const KTX_texture_info *textureInfo, GLsizei bytesOfKeyValueData, const void *keyValueData, GLuint numImages, KTX_image_info images[]) |
Write image(s) in KTX format to memory. More... | |
Declares the public functions and structures of the KTX API.
#define ktxHashTable_AddKVPair | ( | a, | |
b, | |||
c, | |||
d | |||
) | ktxHashList_AddKVPair(a, b, c, d) |
Add a key-value pair to a KTX_hash_table.
Should be documented as a member of KTX_hash_table but a doxygen limitation prevents that.
#define ktxHashTable_Destroy | ( | a | ) | ktxHashList_Destroy(a); |
Destroy a KTX_hash_table.
Should be documented as a member of KTX_hash_table but a doxygen limitation prevents that.
#define ktxHashTable_FindValue | ( | a, | |
b, | |||
c, | |||
d | |||
) | ktxHashList_FindValue(a, b, c, d) |
Looks up a key and returns its value.
Should be documented as a member of KTX_hash_table but a doxygen limitation prevents that.
enum KTX_error_code |
Error codes returned by library functions.