libktx - The KTX Library
KTX_texture_info Struct Reference

Structure to pass texture information to ktxWriteKTX. More...

#include <ktx.h>

Data Fields

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

Detailed Description

Structure to pass texture information to ktxWriteKTX.

Deprecated:
Use ktxTexture_Create() and ktxTextureCreateInfo

Retained for backward compatibility with Versions 1 & 2.

Field Documentation

§ glBaseInternalFormat

KTX_texture_info::glBaseInternalFormat

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.

§ glFormat

KTX_texture_info::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.

§ glInternalFormat

KTX_texture_info::glInternalFormat

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.

§ glType

KTX_texture_info::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.

§ glTypeSize

KTX_texture_info::glTypeSize

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.

§ numberOfArrayElements

KTX_texture_info::numberOfArrayElements

The number of array elements.

Must be 0 if not an array texture.

§ numberOfFaces

KTX_texture_info::numberOfFaces

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.

§ numberOfMipmapLevels

KTX_texture_info::numberOfMipmapLevels

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.

§ pixelDepth

KTX_texture_info::pixelDepth

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

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

§ pixelHeight

KTX_texture_info::pixelHeight

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

Must be 0 for 1D textures.