From 77f1af598df1cb71e04263828ef7f0399b1cd9de Mon Sep 17 00:00:00 2001 From: niki Date: Tue, 3 May 2022 18:11:31 +0200 Subject: [PATCH] add skeleton for vulkan texture impl --- CMakeLists.txt | 2 ++ src/modules/graphics/vulkan/Texture.cpp | 11 +++++++++++ src/modules/graphics/vulkan/Texture.h | 24 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 src/modules/graphics/vulkan/Texture.cpp create mode 100644 src/modules/graphics/vulkan/Texture.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 44cbb6dc6..e11b77b5c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -582,6 +582,8 @@ set(LOVE_SRC_MODULE_GRAPHICS_VULKAN src/modules/graphics/vulkan/StreamBuffer.cpp src/modules/graphics/vulkan/Buffer.h src/modules/graphics/vulkan/Buffer.cpp + src/modules/graphics/vulkan/Texture.h + src/modules/graphics/vulkan/Texture.cpp ) set(LOVE_SRC_MODULE_GRAPHICS diff --git a/src/modules/graphics/vulkan/Texture.cpp b/src/modules/graphics/vulkan/Texture.cpp new file mode 100644 index 000000000..e3fad771e --- /dev/null +++ b/src/modules/graphics/vulkan/Texture.cpp @@ -0,0 +1,11 @@ +#include "Texture.h" + +namespace love { + namespace graphics { + namespace vulkan { + Texture::Texture(love::graphics::Graphics* gfx, const Settings& settings, const Slices* data) + : love::graphics::Texture(gfx, settings, data) { + } + } + } +} \ No newline at end of file diff --git a/src/modules/graphics/vulkan/Texture.h b/src/modules/graphics/vulkan/Texture.h new file mode 100644 index 000000000..b05f3b100 --- /dev/null +++ b/src/modules/graphics/vulkan/Texture.h @@ -0,0 +1,24 @@ +#include "graphics/Texture.h" + + +namespace love { + namespace graphics { + namespace vulkan { + class Texture : public graphics::Texture { + public: + Texture(love::graphics::Graphics* gfx, const Settings& settings, const Slices* data); + + void copyFromBuffer(Buffer* source, size_t sourceoffset, int sourcewidth, size_t size, int slice, int mipmap, const Rect& rect) override {}; + void copyToBuffer(Buffer* dest, int slice, int mipmap, const Rect& rect, size_t destoffset, int destwidth, size_t size) override {}; + + ptrdiff_t getRenderTargetHandle() const override {}; + ptrdiff_t getSamplerHandle() const override {}; + + void uploadByteData(PixelFormat pixelformat, const void* data, size_t size, int level, int slice, const Rect& r) override {}; + + void generateMipmapsInternal() override {}; + void readbackImageData(love::image::ImageData* imagedata, int slice, int mipmap, const Rect& rect) override {}; + }; + } + } +} \ No newline at end of file