diff --git a/SHADE_Engine/SHADE_Engine.vcxproj b/SHADE_Engine/SHADE_Engine.vcxproj
index 37ddf8f5..2aa3b608 100644
--- a/SHADE_Engine/SHADE_Engine.vcxproj
+++ b/SHADE_Engine/SHADE_Engine.vcxproj
@@ -138,6 +138,7 @@ xcopy /s /r /y /q "$(SolutionDir)/Dependencies/dotnet/bin" "$(OutDir)"
+
@@ -167,13 +168,31 @@ xcopy /s /r /y /q "$(SolutionDir)/Dependencies/dotnet/bin" "$(OutDir)"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -250,6 +269,7 @@ xcopy /s /r /y /q "$(SolutionDir)/Dependencies/dotnet/bin" "$(OutDir)"
+
@@ -273,12 +293,26 @@ xcopy /s /r /y /q "$(SolutionDir)/Dependencies/dotnet/bin" "$(OutDir)"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SHADE_Engine/SHADE_Engine.vcxproj.filters b/SHADE_Engine/SHADE_Engine.vcxproj.filters
index f52aebb0..74be0df1 100644
--- a/SHADE_Engine/SHADE_Engine.vcxproj.filters
+++ b/SHADE_Engine/SHADE_Engine.vcxproj.filters
@@ -28,6 +28,9 @@
{078AA1A3-F318-2B6D-9C37-3F6888A53B13}
+
+ {8C1A20B0-78BC-4A86-6177-5EDA4DB8D1D6}
+
{DBC7D3B0-C769-FE86-B024-12DB9C6585D7}
@@ -70,15 +73,30 @@
{4B204703-3704-0859-A064-02AC8C67F2DA}
+
+ {7A02D7B0-E60F-0597-6FF6-0082DB02D14D}
+
+
+ {85EFB65D-F107-9E87-BAB4-2D21268C3221}
+
{EBA1D3FF-D75C-C3AB-8014-3CF66CAE0D3C}
+
+ {1F603FFC-8B22-7386-D4D2-011340D44B64}
+
{8CDBA7C9-F8E8-D5AF-81CF-D19AEDDBA166}
+
+ {D04C14FB-3C5A-42E1-C540-3ECC314D0E98}
+
{2460C057-1070-6C28-7929-D14665585BC1}
+
+ {7E76F08B-EA83-1E72-736A-1A5DDF76EA28}
+
{FBD334F8-67EA-328E-B061-BEAF1CB70316}
@@ -121,6 +139,9 @@
{EAD6C33D-5697-3F74-1FD2-88F18B518450}
+
+ {3AB383AD-2681-77B3-0F15-E8D9FB815318}
+
{F1B75745-5D6D-D03A-E661-CA115216C73E}
@@ -207,6 +228,9 @@
ECS_Base\UnitTesting
+
+ Editor
+
Engine
@@ -294,18 +318,69 @@
Graphics\Instance
+
+ Graphics\MiddleEnd\Batching
+
+
+ Graphics\MiddleEnd\Batching
+
+
+ Graphics\MiddleEnd\Batching
+
+
+ Graphics\MiddleEnd\GlobalData
+
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
Graphics\MiddleEnd\Interface
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
Graphics\MiddleEnd\Interface
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Meshes
+
+
+ Graphics\MiddleEnd\Meshes
+
Graphics\MiddleEnd\PerFrame
Graphics\MiddleEnd\PerFrame
+
+ Graphics\MiddleEnd\Pipeline
+
Graphics\MiddleEnd\Shaders
@@ -315,6 +390,9 @@
Graphics\MiddleEnd\Shaders
+
+ Graphics\MiddleEnd\Textures
+
Graphics\Pipeline
@@ -421,7 +499,13 @@
Math
- Math
+ Math\Transform
+
+
+ Math\Transform
+
+
+ Math\Transform
Math\Vector
@@ -498,8 +582,6 @@
Tools
-
-
@@ -529,6 +611,9 @@
ECS_Base\UnitTesting
+
+ Editor
+
Engine
@@ -598,24 +683,66 @@
Graphics\Instance
+
+ Graphics\MiddleEnd\Batching
+
+
+ Graphics\MiddleEnd\Batching
+
+
+ Graphics\MiddleEnd\Batching
+
+
+ Graphics\MiddleEnd\GlobalData
+
+
+ Graphics\MiddleEnd\Interface
+
Graphics\MiddleEnd\Interface
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
Graphics\MiddleEnd\Interface
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Interface
+
+
+ Graphics\MiddleEnd\Meshes
+
Graphics\MiddleEnd\PerFrame
Graphics\MiddleEnd\PerFrame
+
+ Graphics\MiddleEnd\Pipeline
+
Graphics\MiddleEnd\Shaders
Graphics\MiddleEnd\Shaders
+
+ Graphics\MiddleEnd\Textures
+
Graphics\Pipeline
@@ -698,7 +825,13 @@
Math
- Math
+ Math\Transform
+
+
+ Math\Transform
+
+
+ Math\Transform
Math\Vector
@@ -740,7 +873,5 @@
Tools
-
-
\ No newline at end of file
diff --git a/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.cpp b/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.cpp
index 77663ab8..6b770c3d 100644
--- a/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.cpp
+++ b/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.cpp
@@ -50,9 +50,8 @@ namespace SHADE
return *this;
}
- std::vector> SHVkDescriptorPool::Allocate(const std::vector>& layouts, std::vector const& variableDescCounts)
+ Handle SHVkDescriptorPool::Allocate(const std::vector>& layouts, std::vector const& variableDescCounts)
{
- SHVkInstance::GetResourceManager().Create(device, GetHandle(), layouts, variableDescCounts);
- return {};
+ return SHVkInstance::GetResourceManager().Create(device, GetHandle(), layouts, variableDescCounts);
}
}
diff --git a/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.h b/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.h
index 9314d940..b862ec09 100644
--- a/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.h
+++ b/SHADE_Engine/src/Graphics/Descriptors/SHVkDescriptorPool.h
@@ -101,7 +101,7 @@ namespace SHADE
/// Handles to the created Descriptor Sets. If this DescriptorPool has run out of
/// space, lesser number of Handles will be returned.
///
- std::vector> Allocate(const std::vector>& layouts, std::vector const& variableDescCounts);
+ Handle Allocate(const std::vector>& layouts, std::vector const& variableDescCounts);
private:
/*-----------------------------------------------------------------------------*/
diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp
index 1130a02b..b38fa275 100644
--- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp
+++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHGraphicsSystem.cpp
@@ -29,6 +29,7 @@ of DigiPen Institute of Technology is prohibited.
#include "Graphics/MiddleEnd/Batching/SHSuperBatch.h"
#include "SHGraphicsConstants.h"
#include "Graphics/MiddleEnd/GlobalData/SHGraphicsGlobalData.h"
+#include "Graphics/Buffers/SHVkBuffer.h"
namespace SHADE
{
@@ -129,7 +130,7 @@ namespace SHADE
}
// Initialize world render graph
- worldRenderGraph->Init(device, swapchain, renderContextCmdPools, globalData);
+ worldRenderGraph->Init(device, swapchain, globalData);
//worldRenderGraph->AddResource("Position", SH_ATT_DESC_TYPE::COLOR, windowDims.first, windowDims.second, vk::Format::eR16G16B16A16Sfloat);
//worldRenderGraph->AddResource("Normals", SH_ATT_DESC_TYPE::COLOR, windowDims.first, windowDims.second, vk::Format::eR16G16B16A16Sfloat);
//worldRenderGraph->AddResource("Composite", SH_ATT_DESC_TYPE::COLOR, windowDims.first, windowDims.second, vk::Format::eR16G16B16A16Sfloat);
@@ -167,7 +168,7 @@ namespace SHADE
debugWorldRenderer->SetCamera(worldCamera);*/
// Add world renderer to default viewport
- worldRenderer = defaultViewport->AddRenderer(resourceManager, swapchain->GetNumImages(), descPool, globalData->GetDescSetLayouts()[SHGraphicsConstants::DescriptorSetIndex::HIGH_FREQUENCY_GLOBALS], worldRenderGraph);
+ worldRenderer = defaultViewport->AddRenderer(resourceManager, swapchain->GetNumImages(), renderContextCmdPools, descPool, globalData->GetDescSetLayouts()[SHGraphicsConstants::DescriptorSetIndex::HIGH_FREQUENCY_GLOBALS], worldRenderGraph);
worldRenderer->SetCamera(worldCamera);
@@ -228,16 +229,37 @@ namespace SHADE
// For every renderer
for (int renIndex = 0; renIndex < static_cast(renderers.size()); ++renIndex)
{
- // Draw first
- renderers[renIndex]->Draw(renderContext.GetCurrentFrame(), MESH_DATA);
+ /*-----------------------------------------------------------------------*/
+ /* Renderer start */
+ /*-----------------------------------------------------------------------*/
+ // get command buffer of the renderer in the current frame
+ auto currentCmdBuffer = renderers[renIndex]->GetCommandBuffer(renderContext.GetCurrentFrame());
- // get render graph
- auto rg = renderers[renIndex]->GetRenderGraph();
+ // Begin recording the command buffer
+ currentCmdBuffer->BeginRecording();
+
+ // Bind all the buffers required for meshes
+ for (auto& [buffer, bindingPoint] : MESH_DATA)
+ {
+ if (buffer->GetUsageBits() & vk::BufferUsageFlagBits::eVertexBuffer)
+ currentCmdBuffer->BindVertexBuffer(bindingPoint, buffer, 0);
+ else if (buffer->GetUsageBits() & vk::BufferUsageFlagBits::eIndexBuffer)
+ currentCmdBuffer->BindIndexBuffer(buffer, 0);
+ }
+
+ // Draw first
+ renderers[renIndex]->Draw(renderContext.GetCurrentFrame());
+
+ // End the command buffer recording
+ currentCmdBuffer->EndRecording();
+ /*-----------------------------------------------------------------------*/
+ /* Renderer end */
+ /*-----------------------------------------------------------------------*/
// submit a command buffer from the current render graph and make it wait for the previous render graph before submitting it to GPU.
graphicsQueue->SubmitCommandBuffer
(
- { rg->GetCommandBuffer(renderContext.GetCurrentFrame()) },
+ { currentCmdBuffer },
{ (vpIndex == viewports.size() - 1 && renIndex == renderers.size() - 1) ? frameData.semRenderFinishHdl : graphSemaphores[!semIndex] },
{ (vpIndex == 0 && renIndex == 0) ? frameData.semImgAvailableHdl : graphSemaphores[semIndex] },
{ vk::PipelineStageFlagBits::eColorAttachmentOutput },
diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.cpp
index 90e137fe..223ceb4f 100644
--- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.cpp
+++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.cpp
@@ -20,20 +20,28 @@ of DigiPen Institute of Technology is prohibited.
#include "SHMaterial.h"
#include "Graphics/MiddleEnd/Interface/SHGraphicsConstants.h"
#include "Graphics/Descriptors/SHVkDescriptorSetGroup.h"
+#include "Graphics/Buffers/SHVkBuffer.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Constructor/Destructors */
/*-----------------------------------------------------------------------------------*/
- SHRenderer::SHRenderer(Handle logicalDevice, uint32_t numFrames, Handle descriptorPool, Handle cameraDescLayout, Handle viewport, Handle renderGraph)
+ SHRenderer::SHRenderer(Handle logicalDevice, uint32_t numFrames, std::vector>& cmdPools, Handle descriptorPool, Handle cameraDescLayout, Handle viewport, Handle renderGraph)
: viewport { viewport }
, renderGraph { renderGraph }
{
- cameraDescriptorSet = logicalDevice->CreateDescriptorSetGroup(descriptorPool, { cameraDescLayout }, { 1 });
+ commandBuffers.resize(static_cast(numFrames));
+
+ for (uint32_t i = 0; i < commandBuffers.size(); ++i)
+ commandBuffers[i] = cmdPools[i]->RequestCommandBuffer(SH_CMD_BUFFER_TYPE::PRIMARY);
+
+ cameraDescriptorSet = descriptorPool->Allocate({ cameraDescLayout }, { 1 });
cpuCameraData.resize(numFrames);
cameraDataAlignedSize = logicalDevice->PadUBOSize(sizeof(SHShaderCameraData));
+
+ cameraBuffer = logicalDevice->CreateBuffer(cameraDataAlignedSize * numFrames, nullptr, cameraDataAlignedSize * numFrames, vk::BufferUsageFlagBits::eUniformBuffer, VMA_MEMORY_USAGE_AUTO, VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT);
}
/*-----------------------------------------------------------------------------------*/
@@ -47,9 +55,9 @@ namespace SHADE
/*-----------------------------------------------------------------------------------*/
/* Drawing Functions */
/*-----------------------------------------------------------------------------------*/
- void SHRenderer::Draw(uint32_t frameIndex, std::initializer_list, uint32_t>> graphScopeBuffers) noexcept
+ void SHRenderer::Draw(uint32_t frameIndex) noexcept
{
- renderGraph->Execute(frameIndex, graphScopeBuffers);
+ renderGraph->Execute(frameIndex, commandBuffers[frameIndex]);
}
void SHRenderer::BindDescriptorSet(Handle cmdBuffer, uint32_t frameIndex) noexcept
@@ -64,4 +72,9 @@ namespace SHADE
return renderGraph;
}
+ Handle SHRenderer::GetCommandBuffer(uint32_t frameIndex) const noexcept
+ {
+ return commandBuffers[frameIndex];
+ }
+
}
diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.h b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.h
index 843ad6bf..bbb7773b 100644
--- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.h
+++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHRenderer.h
@@ -39,6 +39,7 @@ namespace SHADE
class SHVkDescriptorSetGroup;
class SHGraphicsGlobalData;
class SHVkDescriptorPool;
+ class SHVkBuffer;
struct SHShaderCameraData
{
@@ -63,7 +64,7 @@ namespace SHADE
/*-----------------------------------------------------------------------------*/
/* Constructor/Destructors */
/*-----------------------------------------------------------------------------*/
- SHRenderer(Handle logicalDevice, uint32_t numFrames, Handle descriptorPool, Handle cameraDescLayout, Handle viewport, Handle renderGraph);
+ SHRenderer(Handle logicalDevice, uint32_t numFrames, std::vector>& cmdPools, Handle descriptorPool, Handle cameraDescLayout, Handle viewport, Handle renderGraph);
/*-----------------------------------------------------------------------------*/
/* Camera Registration */
@@ -73,13 +74,14 @@ namespace SHADE
/*-----------------------------------------------------------------------------*/
/* Drawing Functions */
/*-----------------------------------------------------------------------------*/
- void Draw(uint32_t frameIndex, std::initializer_list, uint32_t>> graphScopeBuffers) noexcept;
+ void Draw(uint32_t frameIndex) noexcept;
void BindDescriptorSet (Handle cmdBuffer, uint32_t frameIndex) noexcept;
/*-----------------------------------------------------------------------------*/
/* Setters and Getters */
/*-----------------------------------------------------------------------------*/
Handle GetRenderGraph (void) const noexcept;
+ Handle GetCommandBuffer(uint32_t frameIndex) const noexcept;
private:
/*-----------------------------------------------------------------------------*/
@@ -92,7 +94,13 @@ namespace SHADE
Handle camera;
Handle renderGraph;
Handle cameraDescriptorSet;
+ Handle cameraBuffer;
std::vector cpuCameraData;
+
+ //! Command buffers for the render graph
+ std::vector> commandBuffers;
+
+
};
}
diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHViewport.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHViewport.cpp
index 1e38acf1..25c5bca2 100644
--- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHViewport.cpp
+++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHViewport.cpp
@@ -49,10 +49,10 @@ namespace SHADE
/*---------------------------------------------------------------------------------*/
/* Renderer Registration Functions */
/*---------------------------------------------------------------------------------*/
- Handle SHViewport::AddRenderer(ResourceManager& resourceManager, uint32_t numFrames, Handle descriptorPool, Handle cameraDescLayout, Handle renderGraph)
+ Handle SHViewport::AddRenderer(ResourceManager& resourceManager, uint32_t numFrames, std::vector>& cmdPools, Handle descriptorPool, Handle cameraDescLayout, Handle renderGraph)
{
// Create the renderer
- auto renderer = resourceManager.Create(device, numFrames, descriptorPool, cameraDescLayout, GetHandle(), renderGraph);
+ auto renderer = resourceManager.Create(device, numFrames, cmdPools, descriptorPool, cameraDescLayout, GetHandle(), renderGraph);
// Store
renderers.emplace_back(renderer);
diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHViewport.h b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHViewport.h
index 608446a3..d97d62ce 100644
--- a/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHViewport.h
+++ b/SHADE_Engine/src/Graphics/MiddleEnd/Interface/SHViewport.h
@@ -32,6 +32,7 @@ namespace SHADE
class SHRenderGraph;
class SHVkDescriptorPool;
class SHVkDescriptorSetLayout;
+ class SHVkCommandPool;
/*---------------------------------------------------------------------------------*/
/* Type Definitions */
@@ -58,7 +59,7 @@ namespace SHADE
/*-----------------------------------------------------------------------------*/
/* Renderers Registration Functions */
/*-----------------------------------------------------------------------------*/
- Handle AddRenderer(ResourceManager& resourceManager, uint32_t numFrames, Handle descriptorPool, Handle cameraDescLayout, Handle renderGraph);
+ Handle AddRenderer(ResourceManager& resourceManager, uint32_t numFrames, std::vector>& cmdPools, Handle descriptorPool, Handle cameraDescLayout, Handle renderGraph);
void RemoveRenderer(Handle renderer);
/*-----------------------------------------------------------------------------*/
diff --git a/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.cpp b/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.cpp
index d7404db2..d02e8f7d 100644
--- a/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.cpp
+++ b/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.cpp
@@ -946,25 +946,6 @@ namespace SHADE
}
}
- /***************************************************************************/
- /*!
-
- \brief
- Configures command pools and command buffers.
-
- */
- /***************************************************************************/
- void SHRenderGraph::ConfigureCommands(void) noexcept
- {
- //commandPools.resize (static_cast(swapchainHdl->GetNumImages()));
- commandBuffers.resize(static_cast(swapchainHdl->GetNumImages()));
-
- for (uint32_t i = 0; i < commandBuffers.size(); ++i)
- {
- commandBuffers[i] = commandPools[i]->RequestCommandBuffer(SH_CMD_BUFFER_TYPE::PRIMARY);
- }
- }
-
/***************************************************************************/
/*!
@@ -980,12 +961,11 @@ namespace SHADE
*/
/***************************************************************************/
- void SHRenderGraph::Init(Handle const& logicalDevice, Handle const& swapchain, std::vector> const& cmdPools, Handle inGlobalData) noexcept
+ void SHRenderGraph::Init(Handle const& logicalDevice, Handle const& swapchain, Handle inGlobalData) noexcept
{
logicalDeviceHdl = logicalDevice;
swapchainHdl = swapchain;
globalData = inGlobalData;
- commandPools = cmdPools;
}
/***************************************************************************/
@@ -1087,33 +1067,17 @@ namespace SHADE
ConfigureSubpasses();
ConfigureRenderpasses();
ConfigureFramebuffers();
- ConfigureCommands();
}
// TODO: The graph scope buffers were meant to bind vertex buffers and index buffers for meshes. Find a
// better way to manage these
- void SHRenderGraph::Execute(uint32_t frameIndex, std::initializer_list, uint32_t>> graphScopeBuffers) noexcept
+ void SHRenderGraph::Execute(uint32_t frameIndex, Handle cmdBuffer) noexcept
{
- //commandPools[frameIndex]->Reset();
-
- auto& cmdBuffer = commandBuffers[frameIndex];
- cmdBuffer->BeginRecording();
-
// TODO: DON'T HARDCODE THIS
cmdBuffer->SetViewportScissor(1920.0f, 1080.0f, 1920, 1080);
- for (auto& [buffer, bindingPoint]: graphScopeBuffers)
- {
- if (buffer->GetUsageBits() & vk::BufferUsageFlagBits::eVertexBuffer)
- cmdBuffer->BindVertexBuffer(bindingPoint, buffer, 0);
- else if (buffer->GetUsageBits() & vk::BufferUsageFlagBits::eIndexBuffer)
- cmdBuffer->BindIndexBuffer(buffer, 0);
- }
-
for (auto& node : nodes)
node->Execute(cmdBuffer, frameIndex);
-
- cmdBuffer->EndRecording();
}
void SHRenderGraph::FinaliseBatch()
@@ -1132,9 +1096,5 @@ namespace SHADE
return {};
}
- Handle const& SHRenderGraph::GetCommandBuffer(uint32_t frameIndex) const noexcept
- {
- return commandBuffers[frameIndex];
- }
}
\ No newline at end of file
diff --git a/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.h b/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.h
index 0ecda65a..cbb9586d 100644
--- a/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.h
+++ b/SHADE_Engine/src/Graphics/RenderGraph/SHRenderGraph.h
@@ -250,7 +250,6 @@ namespace SHADE
void ConfigureSubpasses (void) noexcept;
void ConfigureRenderpasses (void) noexcept;
void ConfigureFramebuffers (void) noexcept;
- void ConfigureCommands (void) noexcept;
/*-----------------------------------------------------------------------*/
/* PRIVATE MEMBER VARIABLES */
@@ -271,12 +270,6 @@ namespace SHADE
//! Resource library for graph handles
ResourceManager resourceManager;
-
- //! Command pool for the render graph. DO NOT RESET OR FREE THESE, THEY ARE NON-OWNING. TODO: If application is multithreaded, we need more pools.
- std::vector> commandPools;
-
- //! Command buffers for the render graph
- std::vector> commandBuffers;
//! Handle to global data
Handle globalData;
@@ -290,18 +283,17 @@ namespace SHADE
/*-----------------------------------------------------------------------*/
/* PUBLIC MEMBER FUNCTIONS */
/*-----------------------------------------------------------------------*/
- void Init (Handle const& logicalDevice, Handle const& swapchain, std::vector> const& cmdPools, Handle inGlobalData) noexcept;
+ void Init (Handle const& logicalDevice, Handle const& swapchain, Handle inGlobalData) noexcept;
void AddResource (std::string resourceName, SH_ATT_DESC_TYPE type, uint32_t w = static_cast(-1), uint32_t h = static_cast(-1), vk::Format format = vk::Format::eB8G8R8A8Unorm, uint8_t levels = 1, vk::ImageCreateFlagBits createFlags = {});
Handle AddNode (std::string nodeName, std::initializer_list resourceNames, std::initializer_list predecessorNodes) noexcept;
void Generate (void) noexcept;
- void Execute (uint32_t frameIndex, std::initializer_list, uint32_t>> graphScopeBuffers) noexcept;
+ void Execute (uint32_t frameIndex, Handle cmdBuffer) noexcept;
void FinaliseBatch();
/*-----------------------------------------------------------------------*/
/* SETTERS AND GETTERS */
/*-----------------------------------------------------------------------*/
Handle GetNode (std::string const& nodeName) const noexcept;
- Handle const& GetCommandBuffer (uint32_t frameIndex) const noexcept;
};
}
diff --git a/SHADE_Engine/src/Math/SHMath.h b/SHADE_Engine/src/Math/SHMath.h
index 55bf73a9..5fcea9fc 100644
--- a/SHADE_Engine/src/Math/SHMath.h
+++ b/SHADE_Engine/src/Math/SHMath.h
@@ -9,4 +9,4 @@
#include "SHQuaternion.h"
#include "SHMatrix.h"
-#include "SHTransform.h"
\ No newline at end of file
+#include "Transform/SHTransform.h"
\ No newline at end of file