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
|
|
|
|
|
|
|
|
namespace Seele
|
|
|
|
|
{
|
2020-04-12 15:47:19 +02:00
|
|
|
namespace Vulkan
|
|
|
|
|
{
|
2021-04-01 16:40:14 +02:00
|
|
|
DECLARE_REF(RenderPass)
|
2020-04-12 15:47:19 +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;
|
2020-04-12 15:47:19 +02:00
|
|
|
VkImageView depthAttachment;
|
2023-12-10 22:27:59 +01:00
|
|
|
VkImageView depthResolveAttachment;
|
2020-04-12 15:47:19 +02:00
|
|
|
uint32 numInputAttachments;
|
|
|
|
|
uint32 numColorAttachments;
|
2023-12-10 22:27:59 +01:00
|
|
|
uint32 numResolveAttachments;
|
2020-04-12 15:47:19 +02:00
|
|
|
};
|
|
|
|
|
class Framebuffer
|
|
|
|
|
{
|
|
|
|
|
public:
|
2024-01-31 09:49:53 +01:00
|
|
|
Framebuffer(PGraphics graphics, PRenderPass renderpass, Gfx::RenderTargetLayout renderTargetLayout);
|
2020-04-12 15:47:19 +02:00
|
|
|
virtual ~Framebuffer();
|
2023-11-15 17:42:57 +01:00
|
|
|
constexpr VkFramebuffer getHandle() const
|
2020-03-24 21:05:32 +01:00
|
|
|
{
|
2020-04-12 15:47:19 +02:00
|
|
|
return handle;
|
2020-03-24 21:05:32 +01:00
|
|
|
}
|
2023-11-15 17:42:57 +01:00
|
|
|
constexpr uint32 getHash() const
|
2020-04-12 15:47:19 +02:00
|
|
|
{
|
|
|
|
|
return hash;
|
|
|
|
|
}
|
2020-05-05 01:51:13 +02:00
|
|
|
|
2020-04-12 15:47:19 +02:00
|
|
|
private:
|
|
|
|
|
uint32 hash;
|
|
|
|
|
PGraphics graphics;
|
|
|
|
|
VkFramebuffer handle;
|
2024-01-31 09:49:53 +01:00
|
|
|
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
|