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

42 lines
877 B
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
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
{
VkImageView inputAttachments[16];
VkImageView colorAttachments[16];
VkImageView depthAttachment;
uint32 numInputAttachments;
uint32 numColorAttachments;
};
class Framebuffer
{
public:
Framebuffer(PGraphics graphics, PRenderPass renderpass, Gfx::PRenderTargetLayout renderTargetLayout);
virtual ~Framebuffer();
inline 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
}
2020-04-12 15:47:19 +02:00
inline uint32 getHash() const
{
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;
Gfx::PRenderTargetLayout layout;
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