Vulkan: Add renderpass and framebuffers

This commit is contained in:
Lynix
2020-04-10 17:36:05 +02:00
parent 9507c56fc9
commit d9a08640d6
41 changed files with 659 additions and 95 deletions

View File

@@ -0,0 +1,32 @@
// Copyright (C) 2020 Jérôme Leclercq
// This file is part of the "Nazara Engine - Vulkan Renderer"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/VulkanRenderer/VulkanRenderPass.hpp>
#include <Nazara/VulkanRenderer/Debug.hpp>
namespace Nz
{
inline VulkanRenderPass::VulkanRenderPass(Vk::RenderPass renderPass, std::initializer_list<PixelFormat> formats) :
m_formats(std::begin(formats), std::end(formats)),
m_renderPass(std::move(renderPass))
{
}
inline PixelFormat VulkanRenderPass::GetAttachmentFormat(std::size_t attachmentIndex) const
{
return m_formats[attachmentIndex];
}
inline Vk::RenderPass& VulkanRenderPass::GetRenderPass()
{
return m_renderPass;
}
inline const Vk::RenderPass& VulkanRenderPass::GetRenderPass() const
{
return m_renderPass;
}
}
#include <Nazara/VulkanRenderer/DebugOff.hpp>