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

◆ cleanup_swapchain()

void MayaFlux::Core::VKSwapchain::cleanup_swapchain ( )
private

Cleanup old swapchain during recreation.

Definition at line 167 of file VKSwapchain.cpp.

168{
169 if (!m_context) {
170 return;
171 }
172
173 vk::Device device = m_context->get_device();
174
175 for (auto image_view : m_image_views) {
176 device.destroyImageView(image_view);
177 }
178 m_image_views.clear();
179
180 if (m_swapchain) {
181 device.destroySwapchainKHR(m_swapchain);
182 m_swapchain = nullptr;
183 }
184
185 m_images.clear();
186}
vk::PhysicalDevice device
Definition VKDevice.cpp:141
vk::Device get_device() const
Get logical device.
Definition VKContext.hpp:49
std::vector< vk::Image > m_images
std::vector< vk::ImageView > m_image_views

References device, MayaFlux::Core::VKContext::get_device(), m_context, m_image_views, m_images, and m_swapchain.

Referenced by cleanup(), create(), and recreate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: