Graphics: Replace RenderFrame by RenderResources
This changes makes the whole rendering independent from the RenderFrame acquired from the Swapchain. This may allow to do offscreen rendering (= without swapchain), or multi-window rendering in the future
This commit is contained in:
@@ -53,6 +53,11 @@ namespace Nz
|
||||
SubmitCommandBuffer(commandBuffer, queueTypeFlags);
|
||||
}
|
||||
|
||||
UInt32 VulkanRenderImage::GetImageIndex() const
|
||||
{
|
||||
return m_imageIndex;
|
||||
}
|
||||
|
||||
VulkanUploadPool& VulkanRenderImage::GetUploadPool()
|
||||
{
|
||||
return m_uploadPool;
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace Nz
|
||||
|
||||
currentFrame.Reset(imageIndex);
|
||||
|
||||
return RenderFrame(¤tFrame, invalidateFramebuffer, m_swapchainSize, imageIndex);
|
||||
return RenderFrame(¤tFrame, invalidateFramebuffer, m_swapchainSize);
|
||||
}
|
||||
|
||||
std::shared_ptr<CommandPool> VulkanSwapchain::CreateCommandPool(QueueType queueType)
|
||||
@@ -324,6 +324,11 @@ namespace Nz
|
||||
return m_supportedPresentModes;
|
||||
}
|
||||
|
||||
RenderResources& VulkanSwapchain::GetTransientResources()
|
||||
{
|
||||
return *m_concurrentImageData[m_currentFrame];
|
||||
}
|
||||
|
||||
void VulkanSwapchain::NotifyResize(const Vector2ui& newSize)
|
||||
{
|
||||
OnSwapchainResize(this, newSize);
|
||||
@@ -375,11 +380,6 @@ namespace Nz
|
||||
}
|
||||
}
|
||||
|
||||
TransientResources& VulkanSwapchain::Transient()
|
||||
{
|
||||
return *m_concurrentImageData[m_currentFrame];
|
||||
}
|
||||
|
||||
bool VulkanSwapchain::SetupDepthBuffer()
|
||||
{
|
||||
VkImageCreateInfo imageCreateInfo = {
|
||||
|
||||
Reference in New Issue
Block a user