libktx - The KTX Library 4.1.0
Libraries and tools to create and read KTX image texture files.
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...
 
ktxVulkanDeviceInfoktxVulkanDeviceInfo_CreateEx (VkInstance instance, VkPhysicalDevice physicalDevice, VkDevice device, VkQueue queue, VkCommandPool cmdPool, const VkAllocationCallbacks *pAllocator, const ktxVulkanFunctions *pFuncs)
 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...
 
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. More...
 
void ktxVulkanDeviceInfo_Destruct (ktxVulkanDeviceInfo *This)
 Destruct a ktxVulkanDeviceInfo object. More...
 
void ktxVulkanDeviceInfo_Destroy (ktxVulkanDeviceInfo *This)
 Destroy a ktxVulkanDeviceInfo object. More...
 

Data Fields

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

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);
Struct for passing information about the Vulkan device on which to create images to the texture image...
Definition: ktxvulkan.h:163
VkDevice device
Definition: ktxvulkan.h:166
VkCommandPool cmdPool
Definition: ktxvulkan.h:170
VkPhysicalDevice physicalDevice
Definition: ktxvulkan.h:165
VkQueue queue
Definition: ktxvulkan.h:167
Struct for returning information about the Vulkan texture image created by the ktxTexture_VkUpload* f...
Definition: ktxvulkan.h:110
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.

◆ instance

VkInstance ktxVulkanDeviceInfo::instance

Instance used to communicate with vulkan.

◆ 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.

◆ vkFuncs

ktxVulkanFunctions ktxVulkanDeviceInfo::vkFuncs

The functions needed to operate functions