188 lines
7.7 KiB
Plaintext
188 lines
7.7 KiB
Plaintext
.TH "ktxTexture1" 3 "Sun Jun 14 2026 18:00:57" "Version 0.0.0" "libktx Reference" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
ktxTexture1 \- Class representing a KTX version 1 format texture\&.
|
|
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
.PP
|
|
\fR#include <ktx\&.h>\fP
|
|
.SS "Public Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_GLUpload\fP (\fBktxTexture1\fP *This, GLuint *pTexture, GLenum *pTarget, GLenum *pGlerror)"
|
|
.br
|
|
.RI "Create a GL texture object from a \fBktxTexture1\fP object\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_Create\fP (const \fBktxTextureCreateInfo\fP *const createInfo, ktxTextureCreateStorageEnum storageAllocation, \fBktxTexture1\fP **newTex)"
|
|
.br
|
|
.RI "Create a new empty \fBktxTexture1\fP\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_CreateFromStdioStream\fP (FILE *stdioStream, ktxTextureCreateFlags createFlags, \fBktxTexture1\fP **newTex)"
|
|
.br
|
|
.RI "Create a \fBktxTexture1\fP from a stdio stream reading from a KTX source\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_CreateFromNamedFile\fP (const char *const filename, ktxTextureCreateFlags createFlags, \fBktxTexture1\fP **newTex)"
|
|
.br
|
|
.RI "Create a \fBktxTexture1\fP from a named KTX file\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_CreateFromMemory\fP (const ktx_uint8_t *bytes, ktx_size_t size, ktxTextureCreateFlags createFlags, \fBktxTexture1\fP **newTex)"
|
|
.br
|
|
.RI "Create a \fBktxTexture1\fP from KTX-formatted data in memory\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_CreateFromStream\fP (\fBktxStream\fP *pStream, ktxTextureCreateFlags createFlags, \fBktxTexture1\fP **newTex)"
|
|
.br
|
|
.RI "Create a \fBktxTexture1\fP from KTX-formatted data from a \fR\fBktxStream\fP\fP\&. "
|
|
.ti -1c
|
|
.RI "void \fBktxTexture1_Destroy\fP (\fBktxTexture1\fP *This)"
|
|
.br
|
|
.RI "Destroy a \fBktxTexture1\fP object\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_GetImageOffset\fP (\fBktxTexture1\fP *This, ktx_uint32_t level, ktx_uint32_t layer, ktx_uint32_t faceSlice, ktx_size_t *pOffset)"
|
|
.br
|
|
.RI "Find the offset of an image within a \fBktxTexture\fP's image data\&. "
|
|
.ti -1c
|
|
.RI "ktx_size_t \fBktxTexture1_GetDataSizeUncompressed\fP (\fBktxTexture1\fP *This)"
|
|
.br
|
|
.RI "Return the total size in bytes of the uncompressed data of a \fBktxTexture1\fP\&. "
|
|
.ti -1c
|
|
.RI "ktx_size_t \fBktxTexture1_GetImageSize\fP (\fBktxTexture1\fP *This, ktx_uint32_t level)"
|
|
.br
|
|
.RI "Calculate & return the size in bytes of an image at the specified mip level\&. "
|
|
.ti -1c
|
|
.RI "ktx_size_t \fBktxTexture1_GetLevelSize\fP (\fBktxTexture1\fP *This, ktx_uint32_t level)"
|
|
.br
|
|
.RI "Calculate & return the size in bytes of all the images in the specified mip level\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_IterateLevels\fP (\fBktxTexture1\fP *This, PFNKTXITERCB iterCb, void *userdata)"
|
|
.br
|
|
.RI "Iterate over the mip levels in a \fBktxTexture1\fP object\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_IterateLoadLevelFaces\fP (\fBktxTexture1\fP *This, PFNKTXITERCB iterCb, void *userdata)"
|
|
.br
|
|
.RI "Iterate over the images in a \fBktxTexture1\fP object while loading the image data\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_LoadImageData\fP (\fBktxTexture1\fP *This, ktx_uint8_t *pBuffer, ktx_size_t bufSize)"
|
|
.br
|
|
.RI "Load all the image data from the \fBktxTexture1\fP's source\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_VkUploadEx_WithSuballocator\fP (\fBktxTexture1\fP *This, \fBktxVulkanDeviceInfo\fP *vdi, \fBktxVulkanTexture\fP *vkTexture, VkImageTiling tiling, VkImageUsageFlags usageFlags, VkImageLayout finalLayout, \fBktxVulkanTexture_subAllocatorCallbacks\fP *subAllocatorCallbacks)"
|
|
.br
|
|
.RI "Create a Vulkan image object from a \fBktxTexture1\fP object\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_VkUploadEx\fP (\fBktxTexture1\fP *This, \fBktxVulkanDeviceInfo\fP *vdi, \fBktxVulkanTexture\fP *vkTexture, VkImageTiling tiling, VkImageUsageFlags usageFlags, VkImageLayout finalLayout)"
|
|
.br
|
|
.RI "Create a Vulkan image object from a \fBktxTexture1\fP object\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_VkUpload\fP (\fBktxTexture1\fP *texture, \fBktxVulkanDeviceInfo\fP *vdi, \fBktxVulkanTexture\fP *vkTexture)"
|
|
.br
|
|
.RI "Create a Vulkan image object from a \fBktxTexture1\fP object\&. "
|
|
.ti -1c
|
|
.RI "VkFormat \fBktxTexture1_GetVkFormat\fP (\fBktxTexture1\fP *This)"
|
|
.br
|
|
.RI "Return the VkFormat enum of a \fBktxTexture1\fP object\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_SetImageFromStdioStream\fP (\fBktxTexture1\fP *This, ktx_uint32_t level, ktx_uint32_t layer, ktx_uint32_t faceSlice, FILE *src, ktx_size_t srcSize)"
|
|
.br
|
|
.RI "Set image for level, layer, faceSlice from a stdio stream source\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_SetImageFromMemory\fP (\fBktxTexture1\fP *This, ktx_uint32_t level, ktx_uint32_t layer, ktx_uint32_t faceSlice, const ktx_uint8_t *src, ktx_size_t srcSize)"
|
|
.br
|
|
.RI "Set image for level, layer, faceSlice from an image in memory\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_WriteToStream\fP (\fBktxTexture1\fP *This, \fBktxStream\fP *dststr)"
|
|
.br
|
|
.RI "Write a \fBktxTexture\fP object to a \fBktxStream\fP in KTX format\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_WriteToStdioStream\fP (\fBktxTexture1\fP *This, FILE *dstsstr)"
|
|
.br
|
|
.RI "Write a \fBktxTexture\fP object to a stdio stream in KTX format\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_WriteToNamedFile\fP (\fBktxTexture1\fP *This, const char *const dstname)"
|
|
.br
|
|
.RI "Write a \fBktxTexture\fP object to a named file in KTX format\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_WriteToMemory\fP (\fBktxTexture1\fP *This, ktx_uint8_t **ppDstBytes, ktx_size_t *pSize)"
|
|
.br
|
|
.RI "Write a \fBktxTexture\fP object to block of memory in KTX format\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_WriteKTX2ToStream\fP (\fBktxTexture1\fP *This, \fBktxStream\fP *dststr)"
|
|
.br
|
|
.RI "Write a \fBktxTexture\fP object to a \fBktxStream\fP in KTX 2 format\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_WriteKTX2ToStdioStream\fP (\fBktxTexture1\fP *This, FILE *dstsstr)"
|
|
.br
|
|
.RI "Write a \fBktxTexture\fP object to a stdio stream in KTX2 format\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_WriteKTX2ToNamedFile\fP (\fBktxTexture1\fP *This, const char *const dstname)"
|
|
.br
|
|
.RI "Write a \fBktxTexture\fP object to a named file in KTX2 format\&. "
|
|
.ti -1c
|
|
.RI "\fBKTX_error_code\fP \fBktxTexture1_WriteKTX2ToMemory\fP (\fBktxTexture1\fP *This, ktx_uint8_t **ppDstBytes, ktx_size_t *pSize)"
|
|
.br
|
|
.RI "Write a \fBktxTexture\fP object to block of memory in KTX2 format\&. "
|
|
.in -1c
|
|
.SS "Data Fields"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "ktx_uint32_t \fBglFormat\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "ktx_uint32_t \fBglInternalformat\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "ktx_uint32_t \fBglBaseInternalformat\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "ktx_uint32_t \fBglType\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "struct ktxTexture1_private * \fB_private\fP"
|
|
.br
|
|
.in -1c
|
|
.SH "Detailed Description"
|
|
.PP
|
|
Class representing a KTX version 1 format texture\&.
|
|
|
|
ktxTextures should be created only by one of the ktxTexture_Create* functions and these fields should be considered read-only\&.
|
|
.PP
|
|
\fBExamples\fP
|
|
.in +1c
|
|
\fBglloader\&.c\fP\&.
|
|
.SH "Field Documentation"
|
|
.PP
|
|
.SS "struct ktxTexture1_private* _private"
|
|
Private data\&.
|
|
.SS "ktx_uint32_t glBaseInternalformat"
|
|
Base format of the texture data, e\&.g\&., GL_RGB\&.
|
|
.PP
|
|
\fBExamples\fP
|
|
.in +1c
|
|
\fBglloader\&.c\fP\&.
|
|
.SS "ktx_uint32_t glFormat"
|
|
Format of the texture data, e\&.g\&., GL_RGB\&.
|
|
.PP
|
|
\fBExamples\fP
|
|
.in +1c
|
|
\fBglloader\&.c\fP\&.
|
|
.SS "ktx_uint32_t glInternalformat"
|
|
Internal format of the texture data, e\&.g\&., GL_RGB8\&.
|
|
.PP
|
|
\fBExamples\fP
|
|
.in +1c
|
|
\fBglloader\&.c\fP\&.
|
|
.SS "ktx_uint32_t glType"
|
|
Type of the texture data, e\&.g, GL_UNSIGNED_BYTE\&.
|
|
.PP
|
|
\fBExamples\fP
|
|
.in +1c
|
|
\fBglloader\&.c\fP\&.
|
|
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for libktx Reference from the source code\&.
|