libktx
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Data Fields
KTX_texture_info_t Struct Reference

structure used to pass information about the texture to ktxWriteKTX More...

#include <ktx.h>

Data Fields

khronos_uint32_t glType
 The type of the image data.
khronos_uint32_t glTypeSize
 The data type size to be used in case of endianness conversion.
khronos_uint32_t glFormat
 The format of the image(s).
khronos_uint32_t glInternalFormat
 The internalformat of the image(s).
khronos_uint32_t glBaseInternalFormat
 The base internalformat of the image(s)
khronos_uint32_t pixelWidth
 Width of the image for texture level 0, in pixels.
khronos_uint32_t pixelHeight
 Height of the texture image for level 0, in pixels.
khronos_uint32_t pixelDepth
 Depth of the texture image for level 0, in pixels.
khronos_uint32_t numberOfArrayElements
 The number of array elements.
khronos_uint32_t numberOfFaces
 The number of cubemap faces.
khronos_uint32_t numberOfMipmapLevels
 The number of mipmap levels.

Detailed Description

structure used to pass information about the texture to ktxWriteKTX


Field Documentation

The base internalformat of the image(s)

For non-compressed textures, should be the same as glFormat. For compressed textures specifies the base internal, e.g. GL_RGB, GL_RGBA.

khronos_uint32_t KTX_texture_info_t::glFormat

The format of the image(s).

Values are the same as in the format parameter of glTexImage*D. Must be 0 for compressed images.

The internalformat of the image(s).

Values are the same as for the internalformat parameter of glTexImage*2D. Note: it will not be used when a KTX file containing an uncompressed texture is loaded into OpenGL ES.

khronos_uint32_t KTX_texture_info_t::glType

The type of the image data.

Values are the same as in the type parameter of glTexImage*D. Must be 0 for compressed images.

The data type size to be used in case of endianness conversion.

This value is used in the event conversion is required when the KTX file is loaded. It should be the size in bytes corresponding to glType. Must be 1 for compressed images.

The number of array elements.

Must be 0 if not an array texture.

The number of cubemap faces.

Must be 6 for cubemaps and cubemap arrays, 1 otherwise. Cubemap faces must be provided in the order: +X, -X, +Y, -Y, +Z, -Z.

The number of mipmap levels.

1 for non-mipmapped texture. 0 indicates that a full mipmap pyramid should be generated from level 0 at load time (this is usually not allowed for compressed formats). Mipmaps must be provided in order from largest size to smallest size. The first mipmap level is always level 0.

Depth of the texture image for level 0, in pixels.

Must be 0 for 1D, 2D and cube textures.

Height of the texture image for level 0, in pixels.

Must be 0 for 1D textures.


The documentation for this struct was generated from the following file: