starting swapchain implementation
This commit is contained in:
16
kvf.h
16
kvf.h
@@ -83,6 +83,9 @@ void kvfDestroyFence(VkDevice device, VkFence fence);
|
|||||||
VkSemaphore kvfCreateSemaphore(VkDevice device);
|
VkSemaphore kvfCreateSemaphore(VkDevice device);
|
||||||
void kvfDestroySemaphore(VkDevice device, VkSemaphore semaphore);
|
void kvfDestroySemaphore(VkDevice device, VkSemaphore semaphore);
|
||||||
|
|
||||||
|
VkSwapchainKHR kvfCreateSwapchain(VkDevice device, VkPhysicalDevice physical, VkSurfaceKHR surface);
|
||||||
|
void kvfDestroySwapchain(VkDevice device, VkSwapchainKHR swapchain);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -457,6 +460,19 @@ void kvfDestroySemaphore(VkDevice device, VkSemaphore semaphore)
|
|||||||
vkDestroySemaphore(device, semaphores, NULL);
|
vkDestroySemaphore(device, semaphores, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VkSwapchainKHR kvfCreateSwapchain(VkDevice device, VkPhysicalDevice physical, VkSurfaceKHR surface)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void kvfDestroySwapchain(VkDevice device, VkSwapchainKHR swapchain)
|
||||||
|
{
|
||||||
|
if(swapchain == VK_NULL_HANDLE)
|
||||||
|
return;
|
||||||
|
KVF_ASSERT(device != VK_NULL_HANDLE);
|
||||||
|
vkDestroySwapchainKHR(device, swapchain, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
#endif // KVF_IMPLEMENTATION
|
#endif // KVF_IMPLEMENTATION
|
||||||
|
|
||||||
#endif // KBZ_8_VULKAN_FRAMEWORK_H
|
#endif // KBZ_8_VULKAN_FRAMEWORK_H
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ int main(void)
|
|||||||
VkDevice device = kvfCreateDefaultDevice(ph_device);
|
VkDevice device = kvfCreateDefaultDevice(ph_device);
|
||||||
VkQueue graphics_queue = kvfGetDeviceQueue(device, KVF_GRAPHICS_QUEUE);
|
VkQueue graphics_queue = kvfGetDeviceQueue(device, KVF_GRAPHICS_QUEUE);
|
||||||
VkQueue present_queue = kvfGetDeviceQueue(device, KVF_PRESENT_QUEUE);
|
VkQueue present_queue = kvfGetDeviceQueue(device, KVF_PRESENT_QUEUE);
|
||||||
|
VkSwapchainKHR swapchain = kvfCreateSwapchain(device, ph_device, surface);
|
||||||
|
|
||||||
SDL_Delay(2000);
|
SDL_Delay(2000);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user