forked from Dynamitos/Seele
First render
This commit is contained in:
1 parent
8d4c43361b
commit
b4fc5df74e
21 files changed
+128
-43
No files matched your search
@@ -52,6 +52,12 @@ RenderPass::RenderPass(PGraphics graphics, Gfx::PRenderTargetLayout layout)
|
||||
desc.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
||||
desc.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
||||
|
||||
VkClearValue& clearValue = clearValues.add();
|
||||
if(desc.loadOp == VK_ATTACHMENT_LOAD_OP_CLEAR)
|
||||
{
|
||||
clearValue = cast(colorAttachment->clear);
|
||||
}
|
||||
|
||||
VkAttachmentReference &ref = colorRefs.add();
|
||||
ref.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
||||
ref.attachment = attachmentCounter;
|
||||
@@ -71,6 +77,12 @@ RenderPass::RenderPass(PGraphics graphics, Gfx::PRenderTargetLayout layout)
|
||||
desc.initialLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
||||
desc.finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
||||
|
||||
VkClearValue& clearValue = clearValues.add();
|
||||
if(desc.loadOp == VK_ATTACHMENT_LOAD_OP_CLEAR)
|
||||
{
|
||||
clearValue = cast(layout->depthAttachment->clear);
|
||||
}
|
||||
|
||||
VkAttachmentReference &ref = depthRef;
|
||||
ref.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
||||
ref.attachment = attachmentCounter;
|
||||
|
||||
Reference in new issue
Block a user