Graphics: Rework RenderTargets

- RenderTarget have been moved to the Graphics module and are now lightweight objects between the target of rendering (swapchain or texture)
- RenderTexture no longer require a blit between the framegraph texture and the target texture (the target texture is now directly rendered onto using a new feature of the framegraph)
- ForwardFramePipeline viewers are now properly ordered by render order
This commit is contained in:
SirLynix
2023-11-20 23:00:06 +01:00
parent d06f9bda89
commit 938ba09d45
41 changed files with 445 additions and 254 deletions

View File

@@ -7,11 +7,6 @@
namespace Nz
{
inline WindowSwapchain::~WindowSwapchain()
{
OnRenderTargetRelease(this);
}
inline RenderFrame WindowSwapchain::AcquireFrame()
{
if (m_isMinimized || (!m_hasFocus && m_renderOnlyIfFocused))
@@ -20,11 +15,6 @@ namespace Nz
return m_swapchain->AcquireFrame();
}
inline void WindowSwapchain::BlitTexture(RenderFrame& renderFrame, CommandBufferBuilder& builder, const Texture& texture) const
{
return m_swapchain->BlitTexture(renderFrame, builder, texture);
}
inline bool WindowSwapchain::DoesRenderOnlyIfFocused() const
{
return m_renderOnlyIfFocused;
@@ -53,14 +43,14 @@ namespace Nz
return m_swapchain->GetRenderPass();
}
inline Swapchain& WindowSwapchain::GetSwapchain()
inline Swapchain* WindowSwapchain::GetSwapchain()
{
return *m_swapchain;
return m_swapchain.get();
}
inline const Swapchain& WindowSwapchain::GetSwapchain() const
inline const Swapchain* WindowSwapchain::GetSwapchain() const
{
return *m_swapchain;
return m_swapchain.get();
}
inline TransientResources& WindowSwapchain::Transient()