Implemented KRRenderPass::begin and KRRenderPass::end

This commit is contained in:
2022-03-27 21:56:45 -07:00
parent 2818deb0e3
commit 36f804e176
9 changed files with 52 additions and 30 deletions

View File

@@ -323,7 +323,7 @@ KrResult KRSurface::createSwapChain()
VkFramebufferCreateInfo framebufferInfo{};
framebufferInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
framebufferInfo.renderPass = getRenderPass();
framebufferInfo.renderPass = m_forwardOpaquePass->m_renderPass;
framebufferInfo.attachmentCount = static_cast<uint32_t>(attachments.size());
framebufferInfo.pAttachments = attachments.data();
framebufferInfo.width = m_swapChainExtent.width;
@@ -391,11 +391,6 @@ void KRSurface::createRenderPasses()
m_forwardOpaquePass->create(*device, m_swapChainImageFormat, m_depthImageFormat);
}
VkRenderPass& KRSurface::getRenderPass()
{
return m_forwardOpaquePass->m_renderPass;
}
std::unique_ptr<KRDevice>& KRSurface::getDevice()
{
return m_pContext->getDeviceManager()->getDevice(m_deviceHandle);
@@ -415,3 +410,9 @@ VkFormat KRSurface::getDepthFormat() const
{
return m_depthImageFormat;
}
KRRenderPass& KRSurface::getForwardOpaquePass()
{
return *m_forwardOpaquePass;
}