libktx Reference 4.3.2
Libraries and tools to create and read KTX image texture files.
|
Create texture images on a Vulkan device. More...
Functions | |
ktxVulkanDeviceInfo * | ktxVulkanDeviceInfo_Create (VkPhysicalDevice physicalDevice, VkDevice device, VkQueue queue, VkCommandPool cmdPool, const VkAllocationCallbacks *pAllocator) |
Create a ktxVulkanDeviceInfo object. | |
ktxVulkanDeviceInfo * | ktxVulkanDeviceInfo_CreateEx (VkInstance instance, VkPhysicalDevice physicalDevice, VkDevice device, VkQueue queue, VkCommandPool cmdPool, const VkAllocationCallbacks *pAllocator, const ktxVulkanFunctions *pFuncs) |
Create a ktxVulkanDeviceInfo object. | |
KTX_error_code | ktxVulkanDeviceInfo_Construct (ktxVulkanDeviceInfo *This, VkPhysicalDevice physicalDevice, VkDevice device, VkQueue queue, VkCommandPool cmdPool, const VkAllocationCallbacks *pAllocator) |
Construct a ktxVulkanDeviceInfo object. | |
KTX_error_code | ktxVulkanDeviceInfo_ConstructEx (ktxVulkanDeviceInfo *This, VkInstance instance, VkPhysicalDevice physicalDevice, VkDevice device, VkQueue queue, VkCommandPool cmdPool, const VkAllocationCallbacks *pAllocator, const ktxVulkanFunctions *pFunctions) |
void | ktxVulkanDeviceInfo_Destruct (ktxVulkanDeviceInfo *This) |
Destruct a ktxVulkanDeviceInfo object. | |
void | ktxVulkanDeviceInfo_Destroy (ktxVulkanDeviceInfo *This) |
Destroy a ktxVulkanDeviceInfo object. | |
KTX_error_code | ktxTexture_VkUploadEx_WithSuballocator (ktxTexture *This, ktxVulkanDeviceInfo *vdi, ktxVulkanTexture *vkTexture, VkImageTiling tiling, VkImageUsageFlags usageFlags, VkImageLayout finalLayout, ktxVulkanTexture_subAllocatorCallbacks *subAllocatorCallbacks) |
Create a Vulkan image object from a ktxTexture object. | |
KTX_error_code | ktxTexture_VkUploadEx (ktxTexture *This, ktxVulkanDeviceInfo *vdi, ktxVulkanTexture *vkTexture, VkImageTiling tiling, VkImageUsageFlags usageFlags, VkImageLayout finalLayout) |
Create a Vulkan image object from a ktxTexture object. | |
KTX_error_code | ktxTexture_VkUpload (ktxTexture *texture, ktxVulkanDeviceInfo *vdi, ktxVulkanTexture *vkTexture) |
Create a Vulkan image object from a ktxTexture object. | |
KTX_error_code | ktxTexture1_VkUploadEx_WithSuballocator (ktxTexture1 *This, ktxVulkanDeviceInfo *vdi, ktxVulkanTexture *vkTexture, VkImageTiling tiling, VkImageUsageFlags usageFlags, VkImageLayout finalLayout, ktxVulkanTexture_subAllocatorCallbacks *subAllocatorCallbacks) |
Create a Vulkan image object from a ktxTexture1 object. | |
KTX_error_code | ktxTexture1_VkUploadEx (ktxTexture1 *This, ktxVulkanDeviceInfo *vdi, ktxVulkanTexture *vkTexture, VkImageTiling tiling, VkImageUsageFlags usageFlags, VkImageLayout finalLayout) |
Create a Vulkan image object from a ktxTexture1 object. | |
KTX_error_code | ktxTexture1_VkUpload (ktxTexture1 *texture, ktxVulkanDeviceInfo *vdi, ktxVulkanTexture *vkTexture) |
Create a Vulkan image object from a ktxTexture1 object. | |
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 | ktxTexture1_GetVkFormat (ktxTexture1 *This) |
Return the VkFormat enum of a ktxTexture1 object. | |
VkFormat | ktxTexture2_GetVkFormat (ktxTexture2 *This) |
Return the VkFormat enum of a ktxTexture2 object. | |
VkFormat | ktxTexture_GetVkFormat (ktxTexture *This) |
Return the VkFormat enum of a ktxTexture object. | |
ktx_error_code_e | ktxVulkanTexture_Destruct_WithSuballocator (ktxVulkanTexture *vkTexture, VkDevice device, const VkAllocationCallbacks *pAllocator, ktxVulkanTexture_subAllocatorCallbacks *subAllocatorCallbacks) |
Destructor for the object returned when loading a texture image. | |
void | ktxVulkanTexture_Destruct (ktxVulkanTexture *vkTexture, VkDevice device, const VkAllocationCallbacks *pAllocator) |
Destructor for the object returned when loading a texture image. | |
Create texture images on a Vulkan device.
VkFormat ktxTexture1_GetVkFormat | ( | ktxTexture1 * | This | ) |
Return the VkFormat enum of a ktxTexture1 object.
KTX_error_code ktxTexture1_VkUpload | ( | ktxTexture1 * | texture, |
ktxVulkanDeviceInfo * | vdi, | ||
ktxVulkanTexture * | vkTexture | ||
) |
Create a Vulkan image object from a ktxTexture1 object.
Calls ktxTexture_VkUploadEx() with the most commonly used options: VK_IMAGE_TILING_OPTIMAL
, VK_IMAGE_USAGE_SAMPLED_BIT
and VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
. Use that for complete control.
KTX_error_code ktxTexture1_VkUploadEx | ( | ktxTexture1 * | This, |
ktxVulkanDeviceInfo * | vdi, | ||
ktxVulkanTexture * | vkTexture, | ||
VkImageTiling | tiling, | ||
VkImageUsageFlags | usageFlags, | ||
VkImageLayout | finalLayout | ||
) |
Create a Vulkan image object from a ktxTexture1 object.
Calls ktxTexture_VkUploadEx_WithSuballocator() with no supplied suballocator callbacks. Use that for complete control.
KTX_error_code ktxTexture1_VkUploadEx_WithSuballocator | ( | ktxTexture1 * | This, |
ktxVulkanDeviceInfo * | vdi, | ||
ktxVulkanTexture * | vkTexture, | ||
VkImageTiling | tiling, | ||
VkImageUsageFlags | usageFlags, | ||
VkImageLayout | finalLayout, | ||
ktxVulkanTexture_subAllocatorCallbacks * | subAllocatorCallbacks | ||
) |
Create a Vulkan image object from a ktxTexture1 object.
This simply calls ktxTexture_VkUploadEx_WithSuballocator()
Creates a VkImage with VkFormat
etc. matching the KTX data and uploads the images. Mipmaps will be generated if the ktxTexture's
generateMipmaps
flag is set. Returns the handles of the created objects and information about the texture in the ktxVulkanTexture
pointed at by vkTexture
.
The created VkImage will have VK_SHARING_MODE_EXCLUSIVE
set thus the resulting image will be usable only with queues of the same family as the queue
in the ktxVulkanDeviceInfo pointed to by vdi.
usageFlags
and thus acceptable usage of the created image may be augmented as follows:
VK_IMAGE_USAGE_TRANSFER_DST_BIT
if tiling
is VK_IMAGE_TILING_OPTIMAL
VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT
if generateMipmaps
is set in the ktxTexture
.Most Vulkan implementations support VK_IMAGE_TILING_LINEAR
only for a very limited number of formats and features. Generally VK_IMAGE_TILING_OPTIMAL
is preferred. The latter requires a staging buffer so will use more memory during loading.
If a pointer to a set of suballocator callbacks is provided, they will be used instead of manual allocation of VkDeviceMemory. A 64 bit uint that references the suballocated page(s) is returned on memory procurement and saved in the allocationId
field of the structure pointed to by vkTexture.
[in] | This | pointer to the ktxTexture from which to upload. |
[in] | vdi | pointer to a ktxVulkanDeviceInfo structure providing information about the Vulkan device onto which to load the texture. |
[in,out] | vkTexture | pointer to a ktxVulkanTexture structure into which the function writes information about the created VkImage. |
[in] | tiling | type of tiling to use in the destination image on the Vulkan device. |
[in] | usageFlags | a set of VkImageUsageFlags bits indicating the intended usage of the destination image. |
[in] | finalLayout | a VkImageLayout value indicating the desired final layout of the created image. |
[in] | subAllocatorCallbacks | pointer to a set of suballocator callbacks that wrap around suballocator calls: alloc, bindbuffer, bindimage, map, unmap and free. They use a uint64_t stored in the allocationId field of the structure pointed at by vkTexture to reference allocated page(s). |
KTX_INVALID_VALUE | An incomplete set of callbacks are provided in subAllocatorCallbacks. |
KTX_INVALID_VALUE | This , vdi or vkTexture is NULL . |
KTX_INVALID_OPERATION | The ktxTexture contains neither images nor an active stream from which to read them. |
KTX_INVALID_OPERATION | The combination of the ktxTexture's format, tiling and usageFlags is not supported by the physical device. |
KTX_INVALID_OPERATION | Requested mipmap generation is not supported by the physical device for the combination of the ktxTexture's format and tiling . |
KTX_INVALID_OPERATION | Number of mip levels or array layers exceeds the maximums supported for the ktxTexture's format and tiling . |
KTX_OUT_OF_MEMORY | Sufficient memory could not be allocated on either the CPU or the Vulkan device. |
KTX_UNSUPPORTED_FEATURE | Attempting to sparsely bind KTX textures for the time being will report this error. |
VkFormat ktxTexture2_GetVkFormat | ( | ktxTexture2 * | This | ) |
Return the VkFormat enum of a ktxTexture2 object.
KTX_error_code ktxTexture2_VkUpload | ( | ktxTexture2 * | This, |
ktxVulkanDeviceInfo * | vdi, | ||
ktxVulkanTexture * | vkTexture | ||
) |
Create a Vulkan image object from a ktxTexture2 object.
Calls ktxTexture_VkUploadEx() with the most commonly used options: VK_IMAGE_TILING_OPTIMAL
, VK_IMAGE_USAGE_SAMPLED_BIT
and VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
. Use that for complete control.
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.
This simply calls ktxTexture_VkUploadEx().
Calls ktxTexture_VkUploadEx_WithSuballocator() with no supplied suballocator callbacks. Use that for complete control.
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.
This simplly calls ktxTexture_VkUploadEx_WithSuballocator().
Creates a VkImage with VkFormat
etc. matching the KTX data and uploads the images. Mipmaps will be generated if the ktxTexture's
generateMipmaps
flag is set. Returns the handles of the created objects and information about the texture in the ktxVulkanTexture
pointed at by vkTexture
.
The created VkImage will have VK_SHARING_MODE_EXCLUSIVE
set thus the resulting image will be usable only with queues of the same family as the queue
in the ktxVulkanDeviceInfo pointed to by vdi.
usageFlags
and thus acceptable usage of the created image may be augmented as follows:
VK_IMAGE_USAGE_TRANSFER_DST_BIT
if tiling
is VK_IMAGE_TILING_OPTIMAL
VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT
if generateMipmaps
is set in the ktxTexture
.Most Vulkan implementations support VK_IMAGE_TILING_LINEAR
only for a very limited number of formats and features. Generally VK_IMAGE_TILING_OPTIMAL
is preferred. The latter requires a staging buffer so will use more memory during loading.
If a pointer to a set of suballocator callbacks is provided, they will be used instead of manual allocation of VkDeviceMemory. A 64 bit uint that references the suballocated page(s) is returned on memory procurement and saved in the allocationId
field of the structure pointed to by vkTexture.
[in] | This | pointer to the ktxTexture from which to upload. |
[in] | vdi | pointer to a ktxVulkanDeviceInfo structure providing information about the Vulkan device onto which to load the texture. |
[in,out] | vkTexture | pointer to a ktxVulkanTexture structure into which the function writes information about the created VkImage. |
[in] | tiling | type of tiling to use in the destination image on the Vulkan device. |
[in] | usageFlags | a set of VkImageUsageFlags bits indicating the intended usage of the destination image. |
[in] | finalLayout | a VkImageLayout value indicating the desired final layout of the created image. |
[in] | subAllocatorCallbacks | pointer to a set of suballocator callbacks that wrap around suballocator calls: alloc, bindbuffer, bindimage, map, unmap and free. They use a uint64_t stored in the allocationId field of the structure pointed at by vkTexture to reference allocated page(s). |
KTX_INVALID_VALUE | An incomplete set of callbacks are provided in subAllocatorCallbacks. |
KTX_INVALID_VALUE | This , vdi or vkTexture is NULL . |
KTX_INVALID_OPERATION | The ktxTexture contains neither images nor an active stream from which to read them. |
KTX_INVALID_OPERATION | The combination of the ktxTexture's format, tiling and usageFlags is not supported by the physical device. |
KTX_INVALID_OPERATION | Requested mipmap generation is not supported by the physical device for the combination of the ktxTexture's format and tiling . |
KTX_INVALID_OPERATION | Number of mip levels or array layers exceeds the maximums supported for the ktxTexture's format and tiling . |
KTX_OUT_OF_MEMORY | Sufficient memory could not be allocated on either the CPU or the Vulkan device. |
KTX_UNSUPPORTED_FEATURE | Attempting to sparsely bind KTX textures for the time being will report this error. |
VkFormat ktxTexture_GetVkFormat | ( | ktxTexture * | This | ) |
Return the VkFormat enum of a ktxTexture object.
In ordert to ensure that the Vulkan uploader is not linked into an application unless explicitly called, this is not a virtual function. It determines the texture type then dispatches to the correct function.
KTX_error_code ktxTexture_VkUpload | ( | ktxTexture * | texture, |
ktxVulkanDeviceInfo * | vdi, | ||
ktxVulkanTexture * | vkTexture | ||
) |
Create a Vulkan image object from a ktxTexture object.
Calls ktxTexture_VkUploadEx() with the most commonly used options: VK_IMAGE_TILING_OPTIMAL
, VK_IMAGE_USAGE_SAMPLED_BIT
and VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
. Use that for complete control.
KTX_error_code ktxTexture_VkUploadEx | ( | ktxTexture * | This, |
ktxVulkanDeviceInfo * | vdi, | ||
ktxVulkanTexture * | vkTexture, | ||
VkImageTiling | tiling, | ||
VkImageUsageFlags | usageFlags, | ||
VkImageLayout | finalLayout | ||
) |
Create a Vulkan image object from a ktxTexture object.
Calls ktxTexture_VkUploadEx_WithSuballocator() with no supplied suballocator callbacks. Use that for complete control.
KTX_error_code ktxTexture_VkUploadEx_WithSuballocator | ( | ktxTexture * | This, |
ktxVulkanDeviceInfo * | vdi, | ||
ktxVulkanTexture * | vkTexture, | ||
VkImageTiling | tiling, | ||
VkImageUsageFlags | usageFlags, | ||
VkImageLayout | finalLayout, | ||
ktxVulkanTexture_subAllocatorCallbacks * | subAllocatorCallbacks | ||
) |
Create a Vulkan image object from a ktxTexture object.
Creates a VkImage with VkFormat
etc. matching the KTX data and uploads the images. Mipmaps will be generated if the ktxTexture's
generateMipmaps
flag is set. Returns the handles of the created objects and information about the texture in the ktxVulkanTexture
pointed at by vkTexture
.
The created VkImage will have VK_SHARING_MODE_EXCLUSIVE
set thus the resulting image will be usable only with queues of the same family as the queue
in the ktxVulkanDeviceInfo pointed to by vdi.
usageFlags
and thus acceptable usage of the created image may be augmented as follows:
VK_IMAGE_USAGE_TRANSFER_DST_BIT
if tiling
is VK_IMAGE_TILING_OPTIMAL
VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT
if generateMipmaps
is set in the ktxTexture
.Most Vulkan implementations support VK_IMAGE_TILING_LINEAR
only for a very limited number of formats and features. Generally VK_IMAGE_TILING_OPTIMAL
is preferred. The latter requires a staging buffer so will use more memory during loading.
If a pointer to a set of suballocator callbacks is provided, they will be used instead of manual allocation of VkDeviceMemory. A 64 bit uint that references the suballocated page(s) is returned on memory procurement and saved in the allocationId
field of the structure pointed to by vkTexture.
[in] | This | pointer to the ktxTexture from which to upload. |
[in] | vdi | pointer to a ktxVulkanDeviceInfo structure providing information about the Vulkan device onto which to load the texture. |
[in,out] | vkTexture | pointer to a ktxVulkanTexture structure into which the function writes information about the created VkImage. |
[in] | tiling | type of tiling to use in the destination image on the Vulkan device. |
[in] | usageFlags | a set of VkImageUsageFlags bits indicating the intended usage of the destination image. |
[in] | finalLayout | a VkImageLayout value indicating the desired final layout of the created image. |
[in] | subAllocatorCallbacks | pointer to a set of suballocator callbacks that wrap around suballocator calls: alloc, bindbuffer, bindimage, map, unmap and free. They use a uint64_t stored in the allocationId field of the structure pointed at by vkTexture to reference allocated page(s). |
KTX_INVALID_VALUE | An incomplete set of callbacks are provided in subAllocatorCallbacks. |
KTX_INVALID_VALUE | This , vdi or vkTexture is NULL . |
KTX_INVALID_OPERATION | The ktxTexture contains neither images nor an active stream from which to read them. |
KTX_INVALID_OPERATION | The combination of the ktxTexture's format, tiling and usageFlags is not supported by the physical device. |
KTX_INVALID_OPERATION | Requested mipmap generation is not supported by the physical device for the combination of the ktxTexture's format and tiling . |
KTX_INVALID_OPERATION | Number of mip levels or array layers exceeds the maximums supported for the ktxTexture's format and tiling . |
KTX_OUT_OF_MEMORY | Sufficient memory could not be allocated on either the CPU or the Vulkan device. |
KTX_UNSUPPORTED_FEATURE | Attempting to sparsely bind KTX textures for the time being will report this error. |
KTX_error_code ktxVulkanDeviceInfo_Construct | ( | ktxVulkanDeviceInfo * | This, |
VkPhysicalDevice | physicalDevice, | ||
VkDevice | device, | ||
VkQueue | queue, | ||
VkCommandPool | cmdPool, | ||
const VkAllocationCallbacks * | pAllocator | ||
) |
Construct a ktxVulkanDeviceInfo object.
Records the device information, allocates a command buffer that will be used to transfer image data to the Vulkan device and retrieves the physical device memory properties for ease of use when allocating device memory for the images.
If VK_IMAGE_TILING_OPTIMAL
will be passed to ktxTexture_VkUploadEx(), the family of the queue parameter must support transfers. This is true if any of VK_QUEUE_GRAPHICS_BIT
, VK_QUEUE_COMPUTE_BIT
or VK_QUEUE_TRANSFER_BIT
is set in the queueFlags
property of the queue's VkQueueFamilyProperties
. If protected memory is being used, i.e queueFlags
has the VK_QUEUE_PROTECTED_BIT
set, then VK_IMAGE_TILING_OPTIMAL
must be passed to ktxTexture_VkUploadEx().
VkImages created in ktxTexture_VkUploadEx() will have VK_SHARING_MODE_EXCLUSIVE
set. Thus the resulting image will be usable only with queues of the same family as queue.
Pass a valid ktxVulkanDeviceInfo* to any Vulkan KTX image loading function to provide it with the information.
KTX_NOT_FOUND | A dynamically loaded Vulkan function required by the loader was not found. |
KTX_OUT_OF_MEMORY | A command buffer could not be allocated. |
This | pointer to the ktxVulkanDeviceInfo object to initialize. |
physicalDevice | handle of the Vulkan physical device. |
device | handle of the Vulkan logical device. |
queue | handle of the Vulkan queue. |
cmdPool | handle of the Vulkan command pool. |
pAllocator | pointer to the allocator to use for the image memory. If NULL, the default allocator will be used. |
KTX_error_code ktxVulkanDeviceInfo_ConstructEx | ( | ktxVulkanDeviceInfo * | This, |
VkInstance | instance, | ||
VkPhysicalDevice | physicalDevice, | ||
VkDevice | device, | ||
VkQueue | queue, | ||
VkCommandPool | cmdPool, | ||
const VkAllocationCallbacks * | pAllocator, | ||
const ktxVulkanFunctions * | pFunctions | ||
) |
Construct a ktxVulkanDeviceInfo object.
Records the device information, allocates a command buffer that will be used to transfer image data to the Vulkan device and retrieves the physical device memory properties for ease of use when allocating device memory for the images.
If VK_IMAGE_TILING_OPTIMAL
will be passed to ktxTexture_VkUploadEx(), the family of the queue parameter must support transfers. This is true if any of VK_QUEUE_GRAPHICS_BIT
, VK_QUEUE_COMPUTE_BIT
or VK_QUEUE_TRANSFER_BIT
is set in the queueFlags
property of the queue's VkQueueFamilyProperties
. If protected memory is being used, i.e queueFlags
has the VK_QUEUE_PROTECTED_BIT
set, then VK_IMAGE_TILING_OPTIMAL
must be passed to ktxTexture_VkUploadEx().
VkImages created in ktxTexture_VkUploadEx() will have VK_SHARING_MODE_EXCLUSIVE
set. Thus the resulting image will be usable only with queues of the same family as queue.
Pass a valid ktxVulkanDeviceInfo* to any Vulkan KTX image loading function to provide it with the information.
KTX_NOT_FOUND | A dynamically loaded Vulkan function required by the loader was not found. |
KTX_OUT_OF_MEMORY | A command buffer could not be allocated. |
This | pointer to the ktxVulkanDeviceInfo object to initialize. |
physicalDevice | handle of the Vulkan physical device. |
device | handle of the Vulkan logical device. |
queue | handle of the Vulkan queue. |
cmdPool | handle of the Vulkan command pool. |
pAllocator | pointer to the allocator to use for the image memory. If NULL, the default allocator will be used. |
instance | handle of the Vulkan instance. If VK_NULL_HANDLE , which is not recommended, the function will attempt to initialize the instance-level functions via the platform's standard dynamic library symbol loading mechanisms. |
pFunctions | pointer to the struct of functions to use for vulkan operations. Can be NULL in which case the function will retrieve the proc addresses itself. |
ktxVulkanDeviceInfo * ktxVulkanDeviceInfo_Create | ( | VkPhysicalDevice | physicalDevice, |
VkDevice | device, | ||
VkQueue | queue, | ||
VkCommandPool | cmdPool, | ||
const VkAllocationCallbacks * | pAllocator | ||
) |
Create a ktxVulkanDeviceInfo object.
Allocates CPU memory for a ktxVulkanDeviceInfo object then calls ktxVulkanDeviceInfo_Construct(). See it for documentation of the parameters.
ktxVulkanDeviceInfo * ktxVulkanDeviceInfo_CreateEx | ( | VkInstance | instance, |
VkPhysicalDevice | physicalDevice, | ||
VkDevice | device, | ||
VkQueue | queue, | ||
VkCommandPool | cmdPool, | ||
const VkAllocationCallbacks * | pAllocator, | ||
const ktxVulkanFunctions * | pFuncs | ||
) |
Create a ktxVulkanDeviceInfo object.
Allocates CPU memory for a ktxVulkanDeviceInfo object then calls ktxVulkanDeviceInfo_Construct(). See it for documentation of the parameters.
void ktxVulkanDeviceInfo_Destroy | ( | ktxVulkanDeviceInfo * | This | ) |
Destroy a ktxVulkanDeviceInfo object.
Calls ktxVulkanDeviceInfo_Destruct() then frees the ktxVulkanDeviceInfo.
This | pointer to the ktxVulkanDeviceInfo to destroy. |
void ktxVulkanDeviceInfo_Destruct | ( | ktxVulkanDeviceInfo * | This | ) |
Destruct a ktxVulkanDeviceInfo object.
Frees the command buffer.
This | pointer to the ktxVulkanDeviceInfo to destruct. |
void ktxVulkanTexture_Destruct | ( | ktxVulkanTexture * | vkTexture, |
VkDevice | device, | ||
const VkAllocationCallbacks * | pAllocator | ||
) |
Destructor for the object returned when loading a texture image.
Calls ktxVulkanTexture_Destruct_WithSuballocator() without a set of suballocator callbacks.
ktx_error_code_e ktxVulkanTexture_Destruct_WithSuballocator | ( | ktxVulkanTexture * | vkTexture, |
VkDevice | device, | ||
const VkAllocationCallbacks * | pAllocator, | ||
ktxVulkanTexture_subAllocatorCallbacks * | subAllocatorCallbacks | ||
) |
Destructor for the object returned when loading a texture image.
Frees the Vulkan resources created when the texture image was loaded. If a complete set of suballocator callbacks are provided, it will use the free call from those instead.
vkTexture | pointer to the ktxVulkanTexture to be destructed. |
device | handle to the Vulkan logical device to which the texture was loaded. |
pAllocator | pointer to the allocator used during loading. |
subAllocatorCallbacks | pointer to a structure of suballocator callbacks. Pass NULL if a suballocator was not used. |