2024-07-01 23:29:59 +08:00
|
|
|
|
#include<hgl/graph/VKSwapchain.h>
|
2025-01-25 21:16:25 +08:00
|
|
|
|
#include<hgl/graph/VKTexture.h>
|
2021-12-15 20:46:33 +08:00
|
|
|
|
#include<hgl/graph/VKFramebuffer.h>
|
2025-01-25 21:16:25 +08:00
|
|
|
|
#include<hgl/graph/VKCommandBuffer.h>
|
2019-07-13 02:37:19 +08:00
|
|
|
|
|
|
|
|
|
VK_NAMESPACE_BEGIN
|
2025-01-25 21:16:25 +08:00
|
|
|
|
SwapchainImage::~SwapchainImage()
|
|
|
|
|
{
|
|
|
|
|
delete cmd_buf;
|
|
|
|
|
delete fbo;
|
|
|
|
|
|
|
|
|
|
if(depth)
|
|
|
|
|
delete depth;
|
|
|
|
|
|
|
|
|
|
delete color;
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-16 20:57:17 +08:00
|
|
|
|
Swapchain::~Swapchain()
|
2019-07-13 02:37:19 +08:00
|
|
|
|
{
|
2025-01-25 01:41:00 +08:00
|
|
|
|
SAFE_CLEAR_ARRAY(sc_image);
|
2019-07-16 20:57:17 +08:00
|
|
|
|
|
|
|
|
|
if(swap_chain)
|
|
|
|
|
{
|
|
|
|
|
vkDestroySwapchainKHR(device,swap_chain,VK_NULL_HANDLE);
|
|
|
|
|
swap_chain=VK_NULL_HANDLE;
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-25 01:41:00 +08:00
|
|
|
|
image_count=0;
|
2019-07-13 02:37:19 +08:00
|
|
|
|
}
|
|
|
|
|
VK_NAMESPACE_END
|