Graphics/FrameGraph: Add AttachmentProxy

This commit is contained in:
Jérôme Leclercq
2021-12-13 23:44:14 +01:00
parent 3185e73941
commit dfa2a0040a
3 changed files with 142 additions and 72 deletions

View File

@@ -16,6 +16,20 @@ namespace Nz
return id;
}
inline std::size_t FrameGraph::AddAttachmentProxy(std::string name, std::size_t attachmentId)
{
assert(attachmentId < m_attachments.size());
assert(std::holds_alternative<FramePassAttachment>(m_attachments[attachmentId]));
std::size_t id = m_attachments.size();
m_attachments.emplace_back(AttachmentProxy {
attachmentId,
std::move(name)
});
return id;
}
inline void FrameGraph::AddBackbufferOutput(std::size_t backbufferOutput)
{
m_backbufferOutputs.push_back(backbufferOutput);