Implementing basic physics

This commit is contained in:
Dynamitos
2022-11-29 16:34:42 +01:00
parent 3d3e264867
commit 1e04da963d
39 changed files with 1999 additions and 145 deletions
@@ -34,7 +34,6 @@ target_sources(Engine
PUBLIC FILE_SET HEADERS
FILES
VulkanAllocator.h
VulkanBuffer.cpp
VulkanCommandBuffer.h
VulkanFramebuffer.h
VulkanGraphics.h
+13 -13
View File
@@ -63,19 +63,19 @@ ShaderBuffer::ShaderBuffer(PGraphics graphics, uint64 size, VkBufferUsageFlags u
ShaderBuffer::~ShaderBuffer()
{
PCmdBuffer cmdBuffer = graphics->getQueueCommands(owner)->getCommands();
VkDevice device = graphics->getDevice();
auto deletionLambda = [cmdBuffer, device](VkBuffer) -> void
{
//co_await cmdBuffer->asyncWait();
//vkDestroyBuffer(device, buffer, nullptr);
//co_return;
};
for (uint32 i = 0; i < numBuffers; ++i)
{
deletionLambda(buffers[i].buffer);
buffers[i].allocation = nullptr;
}
//PCmdBuffer cmdBuffer = graphics->getQueueCommands(owner)->getCommands();
//VkDevice device = graphics->getDevice();
//auto deletionLambda = [cmdBuffer, device](VkBuffer) -> void
//{
// //co_await cmdBuffer->asyncWait();
// //vkDestroyBuffer(device, buffer, nullptr);
// //co_return;
//};
//for (uint32 i = 0; i < numBuffers; ++i)
//{
// deletionLambda(buffers[i].buffer);
// buffers[i].allocation = nullptr;
//}
graphics = nullptr;
}