Graphics vulkan

Graphics Vulkan API

Namespace: dmGraphics
Include: #include <dmsdk/graphics/graphics_vulkan.h>
TYPES
VkDescriptorPool
VkDevice
FUNCTIONS
bool VulkanCreateDescriptorPool(VkDevice vk_device, uint16_t max_descriptors, VkDescriptorPool* vk_descriptor_pool_out) Create Vulkan descriptor pool. No need to dealloca...
dmGraphics::HTexture VulkanGetActiveSwapChainTexture(dmGraphics::HContext context) Get the current swap chain texture
VkCommandBuffer VulkanGetCurrentFrameCommandBuffer(dmGraphics::HContext context) Get Vulkan command buffer which used at the curren...
VkDevice VulkanGetDevice(dmGraphics::HContext context) Get Vulkan device handle. Only available when usin...
VkQueue VulkanGetGraphicsQueue(dmGraphics::HContext context) Get Vulkan graphics queue handle. Only available w...
void VulkanGetGraphicsQueueFamily(dmGraphics::HContext context) Get Vulkan queue family. Only available when using...
VkInstance VulkanGetInstance(dmGraphics::HContext context) Get Vulkan instance handle. Only available when us...
VkPhysicalDevice VulkanGetPhysicalDevice(dmGraphics::HContext context) Get Vulkan physical device handle. Only available ...
VkRenderPass VulkanGetRenderPass(dmGraphics::HContext context) Get Vulkan render pass handle. Only available when...
id VulkanGraphicsCommandQueueToMetal(dmGraphics::HContext context) Get the native MTLCommandQueue from the Vulkan con...
id VulkanTextureToMetal(dmGraphics::HContext context, dmGraphics::HTexture texture) Get a native MTLTexture from a Vulkan HTexture. On...

Functions

VulkanCreateDescriptorPool

bool VulkanCreateDescriptorPool(VkDevice vk_device, uint16_t max_descriptors, VkDescriptorPool* vk_descriptor_pool_out)

Create Vulkan descriptor pool. No need to deallocate descripto pool manualy because it will be deallocated automatically when context will be destroyed. Only available when using Mac/iOS.

PARAMETERS

VkDevice vk_device the Vulkan device handle
uint16_t max_descriptors maximum size of allocated pool
VkDescriptorPool* vk_descriptor_pool_out result Vulkan descriptor pool

RETURNS

bool true if creation was successful. Otherwise returns false

VulkanGetActiveSwapChainTexture

dmGraphics::HTexture VulkanGetActiveSwapChainTexture(dmGraphics::HContext context)

Get the current swap chain texture

PARAMETERS

dmGraphics::HContext context the Vulkan context

RETURNS

dmGraphics::HTexture the swap chain texture for the current frame

VulkanGetCurrentFrameCommandBuffer

VkCommandBuffer VulkanGetCurrentFrameCommandBuffer(dmGraphics::HContext context)

Get Vulkan command buffer which used at the current frame. Only available when using Mac/iOS.

PARAMETERS

dmGraphics::HContext context the Vulkan context

RETURNS

VkCommandBuffer the Vulkan command buffer

VulkanGetDevice

VkDevice VulkanGetDevice(dmGraphics::HContext context)

Get Vulkan device handle. Only available when using Mac/iOS.

PARAMETERS

dmGraphics::HContext context the Vulkan context

RETURNS

VkDevice the Vulkan device handle

VulkanGetGraphicsQueue

VkQueue VulkanGetGraphicsQueue(dmGraphics::HContext context)

Get Vulkan graphics queue handle. Only available when using Mac/iOS.

PARAMETERS

dmGraphics::HContext context the Vulkan context

RETURNS

VkQueue the Vulkan graphics queue

VulkanGetGraphicsQueueFamily

void VulkanGetGraphicsQueueFamily(dmGraphics::HContext context)

Get Vulkan queue family. Only available when using Mac/iOS.

PARAMETERS

dmGraphics::HContext context the Vulkan context return family uint16_t graphics queue family

VulkanGetInstance

VkInstance VulkanGetInstance(dmGraphics::HContext context)

Get Vulkan instance handle. Only available when using Mac/iOS.

PARAMETERS

dmGraphics::HContext context the Vulkan context

RETURNS

VkInstance the Vulkan instance handle

VulkanGetPhysicalDevice

VkPhysicalDevice VulkanGetPhysicalDevice(dmGraphics::HContext context)

Get Vulkan physical device handle. Only available when using Mac/iOS.

PARAMETERS

dmGraphics::HContext context the Vulkan context

RETURNS

VkPhysicalDevice the Vulkan physical device handle

VulkanGetRenderPass

VkRenderPass VulkanGetRenderPass(dmGraphics::HContext context)

Get Vulkan render pass handle. Only available when using Mac/iOS.

PARAMETERS

dmGraphics::HContext context the Vulkan context

RETURNS

VkRenderPass the Vulkan render pass handle

VulkanGraphicsCommandQueueToMetal

id VulkanGraphicsCommandQueueToMetal(dmGraphics::HContext context)

Get the native MTLCommandQueue from the Vulkan context. Only available when using Mac/iOS.

PARAMETERS

dmGraphics::HContext context the Vulkan context

RETURNS

id the Metal graphics queue wrapped with a (__bridge void*)

VulkanTextureToMetal

id VulkanTextureToMetal(dmGraphics::HContext context, dmGraphics::HTexture texture)

Get a native MTLTexture from a Vulkan HTexture. Only available when using Mac/iOS.

PARAMETERS

dmGraphics::HContext context the Vulkan context
dmGraphics::HTexture texture the texture

RETURNS

id the Metal texture wrapped with a (__bridge void*)

Types

VkDescriptorPool


VkDevice