KRRenderPass now keeps RenderPassInfo after initialization.

KRRenderPass now accepts clear color at initialization, no longer requiring to pass it on every instantiation.
This commit is contained in:
2024-01-20 16:31:06 -08:00
parent b37acc1fd2
commit d92a039fab
2 changed files with 9 additions and 6 deletions

View File

@@ -204,6 +204,7 @@ KrResult KRSurface::createSwapChain()
info.clearDepth = true;
info.keepDepth = false;
info.finalPass = false;
info.clearColorValue = Vector4::Zero();
m_forwardOpaquePass->create(*device, selectedSurfaceFormat.format, depthImageFormat, info);
info.clearColor = true;
@@ -332,6 +333,6 @@ void KRSurface::endFrame()
void KRSurface::renderBlackFrame(VkCommandBuffer &commandBuffer)
{
m_blackFramePass->begin(commandBuffer, *this, Vector4::Create(0.0f, 0.0f, 0.0f, 1.0f));
m_blackFramePass->begin(commandBuffer, *this);
m_blackFramePass->end(commandBuffer);
}