mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
some work on drawQuads (not fully working yet)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "graphics/Buffer.h"
|
||||
#include <vulkan/vulkan.h>
|
||||
#include "vk_mem_alloc.h"
|
||||
|
||||
|
||||
namespace love {
|
||||
@@ -7,7 +8,7 @@ namespace love {
|
||||
namespace vulkan {
|
||||
class Buffer : public love::graphics::Buffer {
|
||||
public:
|
||||
Buffer(love::graphics::Graphics* gfx, const Settings& settings, const std::vector<DataDeclaration>& format, const void* data, size_t size, size_t arraylength);
|
||||
Buffer(VmaAllocator allocator, love::graphics::Graphics* gfx, const Settings& settings, const std::vector<DataDeclaration>& format, const void* data, size_t size, size_t arraylength);
|
||||
virtual ~Buffer();
|
||||
|
||||
void* map(MapType map, size_t offset, size_t size) override;
|
||||
@@ -18,18 +19,15 @@ namespace love {
|
||||
return (ptrdiff_t) buffer; // todo ?
|
||||
}
|
||||
ptrdiff_t getTexelBufferHandle() const override {
|
||||
throw love::Exception("unimplemented Buffer::getTexelBufferHandle");
|
||||
return (ptrdiff_t) nullptr; // todo ?
|
||||
}
|
||||
|
||||
private:
|
||||
VkDevice device;
|
||||
VkPhysicalDevice physicalDevice;
|
||||
|
||||
// todo use a staging buffer for improved performance
|
||||
VkBuffer buffer;
|
||||
VkDeviceMemory bufferMemory;
|
||||
|
||||
void* mappedMemory;
|
||||
VmaAllocation allocation;
|
||||
VmaAllocationInfo allocInfo;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user