From 4771fbfb762f413a9b35934c3861c60b135d9c71 Mon Sep 17 00:00:00 2001 From: Brandon Mak Date: Sun, 2 Oct 2022 02:28:50 +0800 Subject: [PATCH] WIP --- .../src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp | 2 ++ .../src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h | 1 - .../src/Graphics/MiddleEnd/Interface/SHRenderer.cpp | 8 ++++++++ .../src/Graphics/MiddleEnd/Interface/SHRenderer.h | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp index 8aec5a83..14768108 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp @@ -325,6 +325,8 @@ namespace SHADE void SHGraphicsSystem::Exit(void) { + //worldRenderer-> + graphicsCmdPool.Free(); renderContext.Destroy(); graphicsQueue.Free(); swapchain.Free(); diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h index 6ecb13f0..c89e6ebc 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.h @@ -286,7 +286,6 @@ namespace SHADE Handle transferQueue; Handle descPool; Handle graphicsCmdPool; - Handle transferCmdPool; Handle transferCmdBuffer; Handle graphicsTexCmdBuffer; SHRenderContext renderContext; diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.cpp index 84ac3ee2..14af56ee 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.cpp @@ -49,6 +49,14 @@ namespace SHADE cameraDescriptorSet->UpdateDescriptorSetBuffer(SHGraphicsConstants::DescriptorSetIndex::HIGH_FREQUENCY_GLOBALS, SHGraphicsConstants::DescriptorSetBindings::CAMERA_DATA); } + SHRenderer::~SHRenderer(void) + { + //for (auto& cmdBuffer : commandBuffers) + //{ + // cmdBuffer.Free(); + //} + } + /*-----------------------------------------------------------------------------------*/ /* Camera Registration */ /*-----------------------------------------------------------------------------------*/ diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.h b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.h index 5e72da85..0feea840 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.h @@ -65,6 +65,7 @@ namespace SHADE /* Constructor/Destructors */ /*-----------------------------------------------------------------------------*/ SHRenderer(Handle logicalDevice, uint32_t numFrames, std::vector>& cmdPools, Handle descriptorPool, Handle cameraDescLayout, Handle viewport, Handle renderGraph); + ~SHRenderer(void); /*-----------------------------------------------------------------------------*/ /* Camera Registration */