MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ cleanup()

void MayaFlux::Core::WindowRenderContext::cleanup ( VKContext context)

Definition at line 12 of file BackendWindowHandler.cpp.

13{
14 vk::Device device = context.get_device();
15
16 device.waitIdle();
17
18 for (auto& img : image_available) {
19 if (img) {
20 device.destroySemaphore(img);
21 }
22 }
23 image_available.clear();
24
25 for (auto& render : render_finished) {
26 if (render) {
27 device.destroySemaphore(render);
28 }
29 }
30 render_finished.clear();
31
32 for (auto& fence : in_flight) {
33 if (fence) {
34 device.destroyFence(fence);
35 }
36 }
37 in_flight.clear();
38
39 if (swapchain) {
40 swapchain->cleanup();
41 swapchain.reset();
42 }
43
44 if (surface) {
45 context.destroy_surface(surface);
46 surface = nullptr;
47 }
48
49 window->set_graphics_registered(false);
50}
std::vector< vk::Semaphore > image_available
std::unique_ptr< VKSwapchain > swapchain
std::vector< vk::Semaphore > render_finished

References MayaFlux::Core::VKContext::destroy_surface(), MayaFlux::Core::VKContext::get_device(), image_available, in_flight, render_finished, surface, swapchain, and window.

+ Here is the call graph for this function: