vulkan: implement graphics readback

This commit is contained in:
niki
2022-08-30 17:11:59 +02:00
parent a69d4a38dd
commit ec5a3a50f9
7 changed files with 287 additions and 57 deletions
@@ -0,0 +1,31 @@
#ifndef LOVE_GRAPHICS_VULKAN_GRAPHICS_READBACK_H
#define LOVE_GRAPHICS_VULKAN_GRAPHICS_READBACK_H
#include "graphics/GraphicsReadback.h"
namespace love {
namespace graphics {
namespace vulkan {
class Graphics;
class GraphicsReadback : public graphics::GraphicsReadback {
public:
GraphicsReadback(love::graphics::Graphics* gfx, ReadbackMethod method, love::graphics::Buffer* buffer, size_t offset, size_t size, data::ByteData* dest, size_t destoffset);
GraphicsReadback(love::graphics::Graphics* gfx, ReadbackMethod method, love::graphics::Texture* texture, int slice, int mipmap, const Rect& rect, image::ImageData* dest, int destx, int desty);
virtual ~GraphicsReadback();
void wait() override;
void update() override;
private:
Graphics* vgfx;
StrongRef<love::graphics::Buffer> stagingBuffer;
};
} // vulkan
} // graphics
} // love
#endif