Files
Seele/src/Engine/Graphics/Vulkan/Framebuffer.h
T

37 lines
1.1 KiB
C++
Raw Normal View History

2020-03-24 21:05:32 +01:00
#pragma once
2023-10-26 18:37:29 +02:00
#include "Enums.h"
#include "Graphics.h"
#include "Graphics/RenderTarget.h"
2020-03-24 21:05:32 +01:00
2024-06-09 12:20:04 +02:00
namespace Seele {
namespace Vulkan {
2021-04-01 16:40:14 +02:00
DECLARE_REF(RenderPass)
2024-06-09 12:20:04 +02:00
struct FramebufferDescription {
2023-11-15 17:42:57 +01:00
StaticArray<VkImageView, 16> inputAttachments;
StaticArray<VkImageView, 16> colorAttachments;
2023-12-10 22:27:59 +01:00
StaticArray<VkImageView, 16> resolveAttachments;
2025-05-16 13:04:43 +02:00
VkImageView depthAttachment = VK_NULL_HANDLE;
VkImageView depthResolveAttachment = VK_NULL_HANDLE;
uint32 numInputAttachments = 0;
uint32 numColorAttachments = 0;
uint32 numResolveAttachments = 0;
2020-04-12 15:47:19 +02:00
};
2024-06-09 12:20:04 +02:00
class Framebuffer {
public:
Framebuffer(PGraphics graphics, PRenderPass renderpass, Gfx::RenderTargetLayout renderTargetLayout);
2020-04-12 15:47:19 +02:00
virtual ~Framebuffer();
2024-06-09 12:20:04 +02:00
constexpr VkFramebuffer getHandle() const { return handle; }
constexpr uint32 getHash() const { return hash; }
2025-04-11 21:02:52 +02:00
constexpr VkRect2D getRenderArea() const { return renderArea; }
2020-05-05 01:51:13 +02:00
2024-06-09 12:20:04 +02:00
private:
2020-04-12 15:47:19 +02:00
uint32 hash;
2025-04-11 21:02:52 +02:00
VkRect2D renderArea;
2020-04-12 15:47:19 +02:00
PGraphics graphics;
VkFramebuffer handle;
Gfx::RenderTargetLayout layout;
2020-04-12 15:47:19 +02:00
PRenderPass renderPass;
};
2021-04-01 16:40:14 +02:00
DEFINE_REF(Framebuffer)
2020-04-12 15:47:19 +02:00
} // namespace Vulkan
} // namespace Seele