Vulkan2D
2D renderer written in C using Vulkan and SDL2
|
Tools to allow the user to mess with vulkan themselves. More...
Go to the source code of this file.
Macros | |
#define | VMA_VULKAN_VERSION 1002000 |
Functions | |
VkCommandBuffer | vk2dVulkanGetSingleUseBuffer () |
Returns a command buffer intended to be used once. More... | |
void | vk2dVulkanSubmitSingleUseBuffer (VkCommandBuffer buffer) |
Submits a command buffer previously acquired with vk2dVulkanGetSingleUseBuffer and waits for the queue to finish. More... | |
VkCommandBuffer | vk2dVulkanGetDrawBuffer () |
Returns the command buffer being used to draw the active frame. More... | |
void | vk2dVulkanCopyDataIntoBuffer (void *data, VkDeviceSize size, VkBuffer *outBuffer, VkDeviceSize *bufferOffset) |
Copies arbitrary data into a device-local buffer that can then be accessed from command buffers. More... | |
int | vk2dVulkanGetFrame () |
Returns the current frame being rendered. More... | |
int | vk2dVulkanGetSwapchainImageIndex () |
Returns the current swapchain image being used this frame. More... | |
VkDevice | vk2dVulkanGetDevice () |
Returns the logical device. More... | |
VkPhysicalDevice | vk2dVulkanGetPhysicalDevice () |
Returns the renderer-selected physical device. More... | |
VkQueue | vk2dVulkanGetQueue () |
Returns the queue being used for everything. More... | |
uint32_t | vk2dVulkanGetQueueFamily () |
Returns the queue family in use. More... | |
uint32_t | vk2dVulkanGetSwapchainImageCount () |
Returns the swapchain image count. More... | |
uint32_t | vk2dVulkanGetMaxFramesInFlight () |
Returns the maximum number of frames in flight allowed at once. More... | |
VmaAllocator | vk2dVulkanGetVMA () |
Returns the VMA instance. More... | |
Tools to allow the user to mess with vulkan themselves.
void vk2dVulkanCopyDataIntoBuffer | ( | void * | data, |
VkDeviceSize | size, | ||
VkBuffer * | outBuffer, | ||
VkDeviceSize * | bufferOffset | ||
) |
Copies arbitrary data into a device-local buffer that can then be accessed from command buffers.
data | Data to copy to the gpu |
size | Size of the data in bytes |
outBuffer | Device-local Vulkan buffer that the data will be available on |
bufferOffset | Offset in outBuffer data can be accessed from, will follow uniform buffer alignment rules |
VkDevice vk2dVulkanGetDevice | ( | ) |
Returns the logical device.
VkCommandBuffer vk2dVulkanGetDrawBuffer | ( | ) |
Returns the command buffer being used to draw the active frame.
int vk2dVulkanGetFrame | ( | ) |
Returns the current frame being rendered.
uint32_t vk2dVulkanGetMaxFramesInFlight | ( | ) |
Returns the maximum number of frames in flight allowed at once.
VkPhysicalDevice vk2dVulkanGetPhysicalDevice | ( | ) |
Returns the renderer-selected physical device.
VkQueue vk2dVulkanGetQueue | ( | ) |
Returns the queue being used for everything.
uint32_t vk2dVulkanGetQueueFamily | ( | ) |
Returns the queue family in use.
VkCommandBuffer vk2dVulkanGetSingleUseBuffer | ( | ) |
Returns a command buffer intended to be used once.
uint32_t vk2dVulkanGetSwapchainImageCount | ( | ) |
Returns the swapchain image count.
int vk2dVulkanGetSwapchainImageIndex | ( | ) |
Returns the current swapchain image being used this frame.
VmaAllocator vk2dVulkanGetVMA | ( | ) |
Returns the VMA instance.
void vk2dVulkanSubmitSingleUseBuffer | ( | VkCommandBuffer | buffer | ) |
Submits a command buffer previously acquired with vk2dVulkanGetSingleUseBuffer and waits for the queue to finish.
buffer | Command buffer previously acquired with vk2dVulkanGetSingleUseBuffer |