MayaFlux 0.4.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 166 of file VKSwapchain.cpp.

167{
168 if (!m_context) {
169 return;
170 }
171
172 vk::Device device = m_context->get_device();
173
174 for (auto image_view : m_image_views) {
175 device.destroyImageView(image_view);
176 }
177 m_image_views.clear();
178
179 if (m_swapchain) {
180 device.destroySwapchainKHR(m_swapchain);
181 m_swapchain = nullptr;
182 }
183
184 m_images.clear();
185}
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
vk::SwapchainKHR m_swapchain

References 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: