Vulkan: Add renderpass and framebuffers
This commit is contained in:
@@ -7,6 +7,11 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
inline const VulkanMultipleFramebuffer& VkRenderWindow::GetFramebuffer() const
|
||||
{
|
||||
return *m_framebuffer;
|
||||
}
|
||||
|
||||
inline VulkanDevice& VkRenderWindow::GetDevice()
|
||||
{
|
||||
return *m_device;
|
||||
@@ -22,16 +27,6 @@ namespace Nz
|
||||
return m_graphicsQueue;
|
||||
}
|
||||
|
||||
inline const Vk::Framebuffer& VkRenderWindow::GetFrameBuffer(UInt32 imageIndex) const
|
||||
{
|
||||
return m_imageData[imageIndex].framebuffer;
|
||||
}
|
||||
|
||||
inline UInt32 VkRenderWindow::GetFramebufferCount() const
|
||||
{
|
||||
return static_cast<UInt32>(m_imageData.size());
|
||||
}
|
||||
|
||||
inline const Vk::Swapchain& VkRenderWindow::GetSwapchain() const
|
||||
{
|
||||
return m_swapchain;
|
||||
@@ -44,11 +39,11 @@ namespace Nz
|
||||
|
||||
inline void VkRenderWindow::Present(UInt32 imageIndex, VkSemaphore waitSemaphore)
|
||||
{
|
||||
NazaraAssert(imageIndex < m_imageData.size(), "Invalid image index");
|
||||
NazaraAssert(imageIndex < m_inflightFences.size(), "Invalid image index");
|
||||
|
||||
m_presentQueue.Present(m_swapchain, imageIndex, waitSemaphore);
|
||||
|
||||
m_currentFrame = (m_currentFrame + 1) % m_imageData.size();
|
||||
m_currentFrame = (m_currentFrame + 1) % m_inflightFences.size();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user