moved SwapchainImage's Destruct function to .cpp

This commit is contained in:
hyzboy 2025-01-25 21:16:25 +08:00
parent 0a072d846b
commit 63dac1ef74
2 changed files with 14 additions and 10 deletions

View File

@ -1,8 +1,6 @@
#pragma once #pragma once
#include<hgl/graph/VK.h> #include<hgl/graph/VK.h>
#include<hgl/graph/VKFramebuffer.h>
#include<hgl/graph/VKCommandBuffer.h>
VK_NAMESPACE_BEGIN VK_NAMESPACE_BEGIN
struct SwapchainImage struct SwapchainImage
@ -16,13 +14,7 @@ struct SwapchainImage
public: public:
~SwapchainImage() ~SwapchainImage();
{
delete cmd_buf;
delete fbo;
delete depth;
delete color;
}
};//struct SwapchainImage };//struct SwapchainImage
struct Swapchain struct Swapchain

View File

@ -1,8 +1,20 @@
#include<hgl/graph/VKSwapchain.h> #include<hgl/graph/VKSwapchain.h>
#include<hgl/graph/VKTexture.h>
#include<hgl/graph/VKFramebuffer.h> #include<hgl/graph/VKFramebuffer.h>
#include<hgl/graph/VKRenderPass.h> #include<hgl/graph/VKCommandBuffer.h>
VK_NAMESPACE_BEGIN VK_NAMESPACE_BEGIN
SwapchainImage::~SwapchainImage()
{
delete cmd_buf;
delete fbo;
if(depth)
delete depth;
delete color;
}
Swapchain::~Swapchain() Swapchain::~Swapchain()
{ {
SAFE_CLEAR_ARRAY(sc_image); SAFE_CLEAR_ARRAY(sc_image);