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

40 lines
838 B
C++
Raw Normal View History

2020-03-24 21:05:32 +01:00
#pragma once
#include "VulkanGraphicsResources.h"
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