aboutsummaryrefslogtreecommitdiff
path: root/src/Platform/Vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'src/Platform/Vulkan')
-rw-r--r--src/Platform/Vulkan/VulkanRendererAPI.cpp12
-rw-r--r--src/Platform/Vulkan/VulkanRendererAPI.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/src/Platform/Vulkan/VulkanRendererAPI.cpp b/src/Platform/Vulkan/VulkanRendererAPI.cpp
index 0dc9f0e..79f7633 100644
--- a/src/Platform/Vulkan/VulkanRendererAPI.cpp
+++ b/src/Platform/Vulkan/VulkanRendererAPI.cpp
@@ -71,4 +71,16 @@ namespace Donut
{
// TODO(Hachem): Implement Vulkan image texture binding
}
+
+ void VulkanRendererAPI::ReadPixels(uint32_t x, uint32_t y, uint32_t width, uint32_t height,
+ uint32_t format, uint32_t type, void* pixels)
+ {
+ // TODO(Hachem): Implement Vulkan pixel reading
+ // For now, this is a placeholder implementation
+ // In a real Vulkan implementation, this would involve:
+ // 1. Creating a staging buffer
+ // 2. Copying the framebuffer to the staging buffer
+ // 3. Mapping the staging buffer and copying to the pixels array
+ // 4. Unmapping and destroying the staging buffer
+ }
};
diff --git a/src/Platform/Vulkan/VulkanRendererAPI.h b/src/Platform/Vulkan/VulkanRendererAPI.h
index dba7fe6..63a623f 100644
--- a/src/Platform/Vulkan/VulkanRendererAPI.h
+++ b/src/Platform/Vulkan/VulkanRendererAPI.h
@@ -32,5 +32,7 @@ namespace Donut
virtual void BindImageTexture(uint32_t textureID,
uint32_t slot = 0,
bool readOnly = false) override;
+ virtual void ReadPixels(uint32_t x, uint32_t y, uint32_t width, uint32_t height,
+ uint32_t format, uint32_t type, void* pixels) override;
};
};