libktx Reference 4.3.2
Libraries and tools to create and read KTX image texture files.
|
Class representing a KTX version 2 format texture. More...
#include <ktx.h>
Public Member Functions | |
KTX_error_code | ktxTexture2_CompressAstcEx (ktxTexture2 *This, ktxAstcParams *params) |
Encode and compress a ktx texture with uncompressed images to astc. | |
KTX_error_code | ktxTexture2_CompressAstc (ktxTexture2 *This, ktx_uint32_t quality) |
Encode and compress a ktx texture with uncompressed images to astc. | |
KTX_error_code | ktxTexture2_CompressBasisEx (ktxTexture2 *This, ktxBasisParams *params) |
Encode and possibly Supercompress a KTX2 texture with uncompressed images. | |
KTX_error_code | ktxTexture2_CompressBasis (ktxTexture2 *This, ktx_uint32_t quality) |
Supercompress a KTX2 texture with uncompressed images. | |
KTX_error_code | ktxTexture2_TranscodeBasis (ktxTexture2 *This, ktx_transcode_fmt_e outputFormat, ktx_transcode_flags transcodeFlags) |
Transcode a KTX2 texture with BasisLZ/ETC1S or UASTC images. | |
KTX_error_code | ktxTexture2_GLUpload (ktxTexture2 *This, GLuint *pTexture, GLenum *pTarget, GLenum *pGlerror) |
Create a GL texture object from a ktxTexture2 object. | |
KTX_error_code | ktxTexture2_Create (ktxTextureCreateInfo *createInfo, ktxTextureCreateStorageEnum storageAllocation, ktxTexture2 **newTex) |
Create a new empty ktxTexture2. | |
KTX_error_code | ktxTexture2_CreateCopy (ktxTexture2 *orig, ktxTexture2 **newTex) |
Create a ktxTexture2 by making a copy of a ktxTexture2. | |
KTX_error_code | ktxTexture2_CreateFromStdioStream (FILE *stdioStream, ktxTextureCreateFlags createFlags, ktxTexture2 **newTex) |
Create a ktxTexture2 from a stdio stream reading from a KTX source. | |
KTX_error_code | ktxTexture2_CreateFromNamedFile (const char *const filename, ktxTextureCreateFlags createFlags, ktxTexture2 **newTex) |
Create a ktxTexture2 from a named KTX file. | |
KTX_error_code | ktxTexture2_CreateFromMemory (const ktx_uint8_t *bytes, ktx_size_t size, ktxTextureCreateFlags createFlags, ktxTexture2 **newTex) |
Create a ktxTexture2 from KTX-formatted data in memory. | |
KTX_error_code | ktxTexture2_CreateFromStream (ktxStream *stream, ktxTextureCreateFlags createFlags, ktxTexture2 **newTex) |
Create a ktxTexture2 from KTX-formatted data from a stream. | |
void | ktxTexture2_Destroy (ktxTexture2 *This) |
Destroy a ktxTexture2 object. | |
void | ktxTexture2_GetComponentInfo (ktxTexture2 *This, uint32_t *pNumComponents, uint32_t *pComponentByteLength) |
Return information about the components of an image in a texture. | |
ktx_uint32_t | ktxTexture2_GetNumComponents (ktxTexture2 *This) |
Return the number of components in an image of the texture. | |
KTX_error_code | ktxTexture2_GetImageOffset (ktxTexture2 *This, ktx_uint32_t level, ktx_uint32_t layer, ktx_uint32_t faceSlice, ktx_size_t *pOffset) |
Find the offset of an image within a ktxTexture's image data. | |
khr_df_transfer_e | ktxTexture2_GetOETF_e (ktxTexture2 *This) |
Retrieve the opto-electrical transfer function of the images. | |
ktx_uint32_t | ktxTexture2_GetOETF (ktxTexture2 *This) |
Retrieve the opto-electrical transfer function of the images. | |
khr_df_model_e | ktxTexture2_GetColorModel_e (ktxTexture2 *This) |
Retrieve the DFD color model of the images. | |
ktx_bool_t | ktxTexture2_GetPremultipliedAlpha (ktxTexture2 *This) |
Retrieve whether the RGB components have been premultiplied by the alpha component. | |
ktx_bool_t | ktxTexture2_NeedsTranscoding (ktxTexture2 *This) |
Query if the images are in a transcodable format. | |
ktx_size_t | ktxTexture2_GetDataSizeUncompressed (ktxTexture2 *This) |
Return the total size in bytes of the uncompressed data of a ktxTexture2. | |
ktx_size_t | ktxTexture2_GetImageSize (ktxTexture2 *This, ktx_uint32_t level) |
Calculate & return the size in bytes of an image at the specified mip level. | |
KTX_error_code | ktxTexture2_IterateLevels (ktxTexture2 *This, PFNKTXITERCB iterCb, void *userdata) |
Iterate over the mip levels in a ktxTexture2 object. | |
KTX_error_code | ktxTexture2_IterateLoadLevelFaces (ktxTexture2 *This, PFNKTXITERCB iterCb, void *userdata) |
Iterate over the images in a ktxTexture2 object while loading the image data. | |
KTX_error_code | ktxTexture2_LoadImageData (ktxTexture2 *This, ktx_uint8_t *pBuffer, ktx_size_t bufSize) |
Load all the image data from the ktxTexture2's source. | |
KTX_error_code | ktxTexture2_VkUploadEx_WithSuballocator (ktxTexture2 *This, ktxVulkanDeviceInfo *vdi, ktxVulkanTexture *vkTexture, VkImageTiling tiling, VkImageUsageFlags usageFlags, VkImageLayout finalLayout, ktxVulkanTexture_subAllocatorCallbacks *subAllocatorCallbacks) |
Create a Vulkan image object from a ktxTexture2 object. | |
KTX_error_code | ktxTexture2_VkUploadEx (ktxTexture2 *This, ktxVulkanDeviceInfo *vdi, ktxVulkanTexture *vkTexture, VkImageTiling tiling, VkImageUsageFlags usageFlags, VkImageLayout finalLayout) |
Create a Vulkan image object from a ktxTexture2 object. | |
KTX_error_code | ktxTexture2_VkUpload (ktxTexture2 *This, ktxVulkanDeviceInfo *vdi, ktxVulkanTexture *vkTexture) |
Create a Vulkan image object from a ktxTexture2 object. | |
VkFormat | ktxTexture2_GetVkFormat (ktxTexture2 *This) |
Return the VkFormat enum of a ktxTexture2 object. | |
KTX_error_code | ktxTexture2_SetImageFromStdioStream (ktxTexture2 *This, ktx_uint32_t level, ktx_uint32_t layer, ktx_uint32_t faceSlice, FILE *src, ktx_size_t srcSize) |
Set image for level, layer, faceSlice from a stdio stream source. | |
KTX_error_code | ktxTexture2_SetImageFromMemory (ktxTexture2 *This, ktx_uint32_t level, ktx_uint32_t layer, ktx_uint32_t faceSlice, const ktx_uint8_t *src, ktx_size_t srcSize) |
Set image for level, layer, faceSlice from an image in memory. | |
KTX_error_code | ktxTexture2_WriteToStream (ktxTexture2 *This, ktxStream *dststr) |
Write a ktxTexture object to a ktxStream in KTX format. | |
KTX_error_code | ktxTexture2_WriteToStdioStream (ktxTexture2 *This, FILE *dstsstr) |
Write a ktxTexture object to a stdio stream in KTX format. | |
KTX_error_code | ktxTexture2_WriteToNamedFile (ktxTexture2 *This, const char *const dstname) |
Write a ktxTexture object to a named file in KTX format. | |
KTX_error_code | ktxTexture2_WriteToMemory (ktxTexture2 *This, ktx_uint8_t **ppDstBytes, ktx_size_t *pSize) |
Write a ktxTexture object to block of memory in KTX format. | |
KTX_error_code | ktxTexture2_DeflateZstd (ktxTexture2 *This, ktx_uint32_t compressionLevel) |
Deflate the data in a ktxTexture2 object using Zstandard. | |
KTX_error_code | ktxTexture2_DeflateZLIB (ktxTexture2 *This, ktx_uint32_t compressionLevel) |
Deflate the data in a ktxTexture2 object using miniz (ZLIB). | |
Data Fields | |
struct ktxTexture2_private * | _private |
Class representing a KTX version 2 format texture.
ktxTextures should be created only by one of the ktxTexture_Create* functions and these fields should be considered read-only.
struct ktxTexture2_private* _private |
Private data.