Vulkan2D
2D renderer written in C using Vulkan and SDL2
Loading...
Searching...
No Matches
VulkanInterface.h
Go to the documentation of this file.
1
4#pragma once
5#include "VK2D/Structs.h"
6#define VMA_VULKAN_VERSION 1002000
7#include <VulkanMemoryAllocator/src/VmaUsage.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
16
19void vk2dVulkanSubmitSingleUseBuffer(VkCommandBuffer buffer);
20
27VkCommandBuffer vk2dVulkanGetDrawBuffer();
28
35
41VkCommandBuffer vk2dVulkanGetCopyBuffer();
42
51void vk2dVulkanCopyDataIntoBuffer(void *data, VkDeviceSize size, VkBuffer *outBuffer, VkDeviceSize *bufferOffset);
52
56
60
64
67VkPhysicalDevice vk2dVulkanGetPhysicalDevice();
68
72
76
80
84
87VmaAllocator vk2dVulkanGetVMA();
88
89#ifdef __cplusplus
90}
91#endif
Forward declares struct typedefs.
uint32_t vk2dVulkanGetQueueFamily()
Returns the queue family in use.
VmaAllocator vk2dVulkanGetVMA()
Returns the VMA instance.
VkQueue vk2dVulkanGetQueue()
Returns the queue being used for everything.
int vk2dVulkanGetFrame()
Returns the current frame being rendered.
void vk2dVulkanSubmitSingleUseBuffer(VkCommandBuffer buffer)
Submits a command buffer previously acquired with vk2dVulkanGetSingleUseBuffer and waits for the queu...
VkCommandBuffer vk2dVulkanGetDrawBuffer()
Returns the command buffer being used to draw the active frame.
uint32_t vk2dVulkanGetSwapchainImageCount()
Returns the swapchain image count.
int vk2dVulkanGetSwapchainImageIndex()
Returns the current swapchain image being used this frame.
VkDevice vk2dVulkanGetDevice()
Returns the logical device.
uint32_t vk2dVulkanGetMaxFramesInFlight()
Returns the maximum number of frames in flight allowed at once.
VkCommandBuffer vk2dVulkanGetSingleUseBuffer()
Returns a command buffer intended to be used once.
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.
VkCommandBuffer vk2dVulkanGetComputeBuffer()
Returns the command buffer being used for compute commands. You may use this buffer for whatever.
VkCommandBuffer vk2dVulkanGetCopyBuffer()
Returns the command buffer being used for copy commands.
VkPhysicalDevice vk2dVulkanGetPhysicalDevice()
Returns the renderer-selected physical device.