move cleanup stuff to vk_finish
This commit is contained in:
parent
22f41e1172
commit
96721f78ee
3 changed files with 10 additions and 4 deletions
|
@ -197,10 +197,7 @@ int ptk_run(PtkHandle root) {
|
|||
}
|
||||
}
|
||||
|
||||
vkDeviceWaitIdle(g_dev);
|
||||
|
||||
vk_cleanup();
|
||||
vk_components_cleanup();
|
||||
vk_finish();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -346,6 +346,13 @@ bool vk_is_done(void) {
|
|||
return glfwWindowShouldClose(g_window);
|
||||
}
|
||||
|
||||
void vk_finish(void) {
|
||||
vkDeviceWaitIdle(g_dev);
|
||||
|
||||
vk_cleanup();
|
||||
vk_components_cleanup();
|
||||
}
|
||||
|
||||
void vk_cleanup(void) {
|
||||
vk_cleanup_swapchain(g_dev);
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ bool vk_init(GLFWwindow *window, const size_t width, const size_t height, const
|
|||
|
||||
bool vk_is_done(void);
|
||||
|
||||
void vk_finish(void);
|
||||
|
||||
bool vk_transfer_vertex_data(void);
|
||||
|
||||
bool vk_record_command_buffer(const VkCommandBuffer command_buffer, const uint32_t image_index);
|
||||
|
|
Loading…
Reference in a new issue