MayaFlux 0.1.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 159 of file VKSwapchain.cpp.

160{
161 if (!m_context) {
162 return;
163 }
164
165 vk::Device device = m_context->get_device();
166
167 for (auto image_view : m_image_views) {
168 device.destroyImageView(image_view);
169 }
170 m_image_views.clear();
171
172 if (m_swapchain) {
173 device.destroySwapchainKHR(m_swapchain);
174 m_swapchain = nullptr;
175 }
176
177 m_images.clear();
178}
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: