use vma for streambuffer implementation

This commit is contained in:
niki
2022-05-04 15:41:50 +02:00
parent 74c0c192f7
commit e6f8b465bc
5 changed files with 42 additions and 48 deletions
+6 -4
View File
@@ -4,13 +4,14 @@
#include "modules/graphics/StreamBuffer.h"
#include "vulkan/vulkan.h"
#include "vk_mem_alloc.h"
namespace love {
namespace graphics {
namespace vulkan {
class StreamBuffer : public love::graphics::StreamBuffer {
public:
StreamBuffer(VkDevice device, VkPhysicalDevice physicalDevice, BufferUsage mode, size_t size);
StreamBuffer(VmaAllocator allocator, BufferUsage mode, size_t size);
virtual ~StreamBuffer();
MapInfo map(size_t minsize) override;
@@ -22,13 +23,14 @@ namespace love {
}
private:
VmaAllocator allocator;
VmaAllocation allocation;
VmaAllocationInfo allocInfo;
VkDevice device;
VkBuffer buffer;
VkDeviceMemory bufferMemory;
void* mappedMemory;
};
}
}
}
#endif
#endif