Crate libktx_rs_sys[−][src]
Expand description
A low-level Rust wrapper over KhronosGroup/KTX-Software, a library for reading, transcoding and writing Khronos Textures (KTX).
You very likely want to use the high-level wrapper, [libktx_rs
] instead of this crate!
Re-exports
pub use self::ktx_error_code_e as ktxResult;
Structs
@memberof ktxTexture @~English @brief Structure for passing extended parameters to ktxTexture_CompressAstc.
@memberof ktxTexture2 @~English @brief Structure for passing extended parameters to ktxTexture2_CompressBasisEx.
@brief Structure for holding size information for a texture format.
@~English @brief Struct describing the logical orientation of an image.
@~English
@class ktxTexture @~English @brief Base class representing a texture.
@class ktxTexture1 @~English @brief Class representing a KTX version 1 format texture.
< Private data.
@class ktxTexture2 @~English @brief Class representing a KTX version 2 format texture.
< Private data.
@memberof ktxTexture @~English @brief Structure for passing texture information to ktxTexture[12]_Create().
@memberof ktxTexture @~English
@memberof ktxTexture @~English @brief Table of virtual ktxTexture methods.
Constants
< Basis LZ supercompression.
< No supercompression.
< ZStd supercompression.
< Allocate image storage.
< Don’t allocate any image storage.
< For safety checks.
< The data in the file is inconsistent with the spec.
< The file is a pipe or named pipe.
< The target file could not be opened.
< The operation would exceed the max file size.
< An error occurred while reading from the file.
< An error occurred while seeking in the file.
< File does not have enough data to satisfy request.
< An error occurred while writing to the file.
< GL operations resulted in an error.
< The operation is not allowed in the current state.
< A parameter value was not valid
< Library dependency (OpenGL or Vulkan) not linked into application.
< Requested key was not found
< Not enough memory to complete the operation.
< Operation was successful.
< Transcoding of block compressed texture failed.
< The file not a KTX file
< Feature not included in in-use library or not yet implemented.
< The KTX file specifies an unsupported texture type.
: 4.74 bpp
: 3.56 bpp
: 8.00 bpp
: 2.67 bpp
: 2.00 bpp
: 6.40 bpp
: 1.60 bpp
: 5.12 bpp
: 1.28 bpp
: 1.02 bpp
: 4.27 bpp
: 0.85 bpp
: 3.56 bpp
: 0.71 bpp
: 0.59 bpp
: 3.20 bpp
: 2.67 bpp
: 2.00 bpp
: 2.56 bpp
: 2.13 bpp
: 1.60 bpp
: 1.28 bpp
: 1.07 bpp
: 0.89 bpp
Old enums for compatibility with code compiled against previous versions of libktx.
ASTC (mobile, Intel devices, hopefully all desktop GPU’s one day)
BC1-5, BC7 (desktop, some mobile devices)
Values for automatic selection of RGB or RGBA depending if alpha present.
ETC1-2
PVRTC1 4bpp (mobile, PowerVR devices)
ATC and FXT1 formats are not supported by KTX2 as there are no equivalent VkFormats.
Uncompressed (raw pixel) formats
Statics
Functions
Returns a string corresponding to a KTX error code.
Get the key from a ktxHashListEntry
Get the value from a ktxHashListEntry
Adds a key-value pair to a hash list.
Deletes a ktxHashListEntry from a ktxHashList.
Finds the entry for a key in a ktxHashList and deletes it.
Creates a hash table from the serialized data read from a a KTX file.
Looks up a key and returns the ktxHashListEntry.
Looks up a key and returns the value.
Return the next entry in a ktxHashList.
Serializes a ktxHashList to a block of memory suitable for writing to a KTX file.
Sorts a ktxHashList into order of the key codepoints.
===========================================================* Utilities for printing info about a KTX file. *
Returns a string corresponding to a supercompression scheme.
Create a new ktxTexture1.
These four create a ktxTexture1 provided the data is in KTX format.
Write a ktxTexture object to a block of memory in KTX format.
Write a ktxTexture object to a named file in KTX format.
Write a ktxTexture object to a stdio stream in KTX format.
Write a ktxTexture object to a ktxStream in KTX format.
Create a new ktxTexture2.
Create a new ktxTexture2 as a copy of an existing texture.
These four create a ktxTexture2 provided the data is in KTX2 format.
These four create a ktxTexture1 or ktxTexture2 according to the data header, and return a pointer to the base ktxTexture class.
Uploads a texture to OpenGL {,ES}.
Returns a pointer to the image data of a ktxTexture object.
Returns the size of all the image data of a ktxTexture object in bytes.
Return the element size of the texture’s images.
Returns the pitch of a row of an image at the specified level. Similar to the rowPitch in a VkSubResourceLayout.
Iterate over the levels or faces in a ktxTexture object.
Returns a string corresponding to a transcode target format.
Type Definitions
Don’t use KTX_APIENTRYP to avoid a Doxygen bug.
@memberof ktxTexture @~English @brief Signature of function called by the ktxTexture_Iterate* functions to receive image data.
@class ktxHashList @~English @brief Opaque handle to a ktxHashList.
@class ktxHashListEntry @~English @brief Opaque handle to an entry in a @ref ktxHashList.
@~English @brief Destruct a stream
@~English @brief type for a pointer to a stream position query function
@~English @brief type for a pointer to a stream size query function
@~English @brief type for a pointer to a stream reading function
@~English @brief type for a pointer to a stream position query function
@~English @brief type for a pointer to a stream skipping function
@~English @brief type for a pointer to a stream reading function
@~English @brief Enumerators identifying the supercompression scheme.
@memberof ktxTexture @~English @brief Flags for requesting services during creation.
@memberof ktxTexture @~English @brief Type for TextureCreateFlags parameters.
@memberof ktxTexture @~English @brief Enum for requesting, or not, allocation of storage for images.
@~English @brief Error codes returned by library functions.
@~English @brief Options specifiying ASTC encoding block dimensions
@~English @brief Options specifiying ASTC encoder profile function
@~English @brief Options specifying ASTC encoder profile mode This and function is used later to derive the profile.
@~English @brief Options specifiying ASTC encoding quality levels.
@~English @brief Flags specifiying UASTC encoding options.
@~English @brief Flags guiding transcoding of Basis Universal compressed textures.
@~English @brief Enumerators for specifying the transcode target format.
To avoid including <KHR/khrplatform.h> define our own types.
This will cause compilation to fail if size of uint32 != 4.