Free resources when VulkanGeometry is freed

This commit is contained in:
2021-01-09 22:56:17 +01:00
parent 412613c757
commit 5afb752fca
4 changed files with 28 additions and 13 deletions

View File

@@ -8,7 +8,9 @@
#define CRASH_ON_MULTIPLE_MAPPINGS_TO_SAME_ALLOCATION
#include <memory>
#include <vulkan/vulkan.hpp>
#include <functional>
namespace openVulkanoCpp::Vulkan
{
@@ -87,6 +89,8 @@ namespace openVulkanoCpp::Vulkan
struct ManagedBuffer
{
using Ptr = std::unique_ptr<ManagedBuffer, std::function<void(ManagedBuffer*)>>;
MemoryAllocation* allocation;
vk::DeviceSize offset, size;
vk::Buffer buffer;