33#ifndef VK_FRAME_BUFFER_H
34#define VK_FRAME_BUFFER_H
38#include <vulkan/vulkan_core.h>
44 class VKAPIRenderTarget;
58 [[nodiscard]]
bool create()
override;
88 rt.
begin(cmdBuffer, descriptor, clearPolicy, pipelineRenderingCreateInfoOut);
92 rt.
end(cmdBuffer, mask);
96 rt.blitFrom(cmdBuffer, source, params );
static void blitFrom(vkRenderTarget &rt, VkCommandBuffer cmdBuffer, vkRenderTarget *source, const RTBlitParams ¶ms) noexcept
static void end(vkRenderTarget &rt, VkCommandBuffer cmdBuffer, const RTTransitionMask &mask)
static void begin(vkRenderTarget &rt, VkCommandBuffer cmdBuffer, const RTDrawDescriptor &descriptor, const RTClearDescriptor &clearPolicy, VkPipelineRenderingCreateInfo &pipelineRenderingCreateInfoOut)
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
GFXDevice & context() const noexcept
PROPERTY_R_IW(VkRenderingInfo, renderingInfo)
void transitionAttachments(VkCommandBuffer cmdBuffer, const RTDrawDescriptor &descriptor, const RTTransitionMask &transitionMask, bool toWrite)
std::array< VkFormat, to_base(RTColourAttachmentSlot::COUNT)> _colourAttachmentFormats
std::array< VkRenderingAttachmentInfo, to_base(RTColourAttachmentSlot::COUNT)> _stagingColourAttachmentInfo
bool create() override
Init all attachments. Returns false if already called.
void begin(VkCommandBuffer cmdBuffer, const RTDrawDescriptor &descriptor, const RTClearDescriptor &clearPolicy, VkPipelineRenderingCreateInfo &pipelineRenderingCreateInfoOut)
void blitFrom(VkCommandBuffer cmdBuffer, vkRenderTarget *source, const RTBlitParams ¶ms) noexcept
RTDrawDescriptor _previousPolicy
VkRenderingAttachmentInfo _depthAttachmentInfo
std::array< VkImageSubresourceRange, RT_MAX_ATTACHMENT_COUNT > _subresourceRange
std::array< VkRenderingAttachmentInfo, to_base(RTColourAttachmentSlot::COUNT)> _colourAttachmentInfo
void end(VkCommandBuffer cmdBuffer, const RTTransitionMask &mask)
Handle console commands that start with a forward slash.
eastl::fixed_vector< RTBlitEntry, MAX_BLIT_ENTRIES, false > RTBlitParams
std::array< RTClearEntry, RT_MAX_ATTACHMENT_COUNT > RTClearDescriptor
bool[RT_MAX_ATTACHMENT_COUNT] RTTransitionMask
constexpr auto to_base(const Type value) -> Type