libktx - The KTX Library
ktxVulkanDeviceInfo Class Reference

Struct for passing information about the Vulkan device on which to create images to the texture image loading functions. More...

#include <ktxvulkan.h>

Public Member Functions

ktxVulkanDeviceInfoktxVulkanDeviceInfo_Create (VkPhysicalDevice physicalDevice, VkDevice device, VkQueue queue, VkCommandPool cmdPool, const VkAllocationCallbacks *pAllocator)
 Create a ktxVulkanDeviceInfo object. More...
 
KTX_error_code ktxVulkanDeviceInfo_Construct (ktxVulkanDeviceInfo *This, VkPhysicalDevice physicalDevice, VkDevice device, VkQueue queue, VkCommandPool cmdPool, const VkAllocationCallbacks *pAllocator)
 Construct a ktxVulkanDeviceInfo object. More...
 
void ktxVulkanDeviceInfo_Destruct (ktxVulkanDeviceInfo *This)
 Destruct a ktxVulkanDeviceInfo object. More...
 
void ktxVulkanDeviceInfo_Destroy (ktxVulkanDeviceInfo *This)
 Destroy a ktxVulkanDeviceInfo object. More...
 

Data Fields

VkPhysicalDevice physicalDevice
 
VkDevice device
 
VkQueue queue
 
VkCommandBuffer cmdBuffer
 
VkCommandPool cmdPool
 
const VkAllocationCallbacks * pAllocator
 
VkPhysicalDeviceMemoryProperties deviceMemoryProperties
 

Detailed Description

Struct for passing information about the Vulkan device on which to create images to the texture image loading functions.

Avoids passing a large number of parameters to each loading function. Use of ktxVulkanDeviceInfo_create() or ktxVulkanDeviceInfo_construct() to populate this structure is highly recommended.

vdi = ktxVulkanDeviceInfo_create(physicalDevice,
&allocator);
ktxLoadVkTextureN("texture_1.ktx", vdi, &texture, NULL, NULL);
// ...
ktxLoadVkTextureN("texture_n.ktx", vdi, &texture, NULL, NULL);
ktxVulkanDeviceInfo_destroy(vdi);
Examples:
vkload.cpp.

Field Documentation

◆ cmdBuffer

VkCommandBuffer ktxVulkanDeviceInfo::cmdBuffer

Handle of the cmdBuffer to use.

◆ cmdPool

VkCommandPool ktxVulkanDeviceInfo::cmdPool

Handle of the command pool from which to allocate the command buffer.

◆ device

VkDevice ktxVulkanDeviceInfo::device

Handle of the logical device.

◆ deviceMemoryProperties

VkPhysicalDeviceMemoryProperties ktxVulkanDeviceInfo::deviceMemoryProperties

Memory properties of the Vulkan physical device.

◆ pAllocator

const VkAllocationCallbacks* ktxVulkanDeviceInfo::pAllocator

Pointer to the allocator to use for the command buffer and created images.

◆ physicalDevice

VkPhysicalDevice ktxVulkanDeviceInfo::physicalDevice

Handle of the physical device.

◆ queue

VkQueue ktxVulkanDeviceInfo::queue

Handle to the queue to which to submit commands.