mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
use vma for streambuffer implementation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user