Updated samples to explicitly call drawUI (updated ImGUI version), some code cleanup, removed no-longer necessary UI setup
Refs #496
This commit is contained in:
parent
350e3d03a3
commit
c1c4f06a23
59 changed files with 133 additions and 63 deletions
|
|
@ -88,8 +88,6 @@ public:
|
|||
};
|
||||
std::vector<Attachments> attachments;
|
||||
|
||||
VkRenderPass uiRenderPass;
|
||||
|
||||
VulkanExample() : VulkanExampleBase(ENABLE_VALIDATION)
|
||||
{
|
||||
title = "Input attachments";
|
||||
|
|
@ -124,8 +122,6 @@ public:
|
|||
vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.attachmentWrite, nullptr);
|
||||
vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.attachmentRead, nullptr);
|
||||
|
||||
vkDestroyRenderPass(device, uiRenderPass, nullptr);
|
||||
|
||||
scene.destroy();
|
||||
uniformBuffers.matrices.destroy();
|
||||
uniformBuffers.params.destroy();
|
||||
|
|
@ -329,11 +325,6 @@ public:
|
|||
renderPassInfoCI.dependencyCount = static_cast<uint32_t>(dependencies.size());
|
||||
renderPassInfoCI.pDependencies = dependencies.data();
|
||||
VK_CHECK_RESULT(vkCreateRenderPass(device, &renderPassInfoCI, nullptr, &renderPass));
|
||||
|
||||
// Create custom overlay render pass
|
||||
attachments[0].loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||
attachments[0].initialLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
|
||||
VK_CHECK_RESULT(vkCreateRenderPass(device, &renderPassInfoCI, nullptr, &uiRenderPass));
|
||||
}
|
||||
|
||||
void buildCommandBuffers()
|
||||
|
|
@ -401,6 +392,8 @@ public:
|
|||
vks::debugmarker::endRegion(drawCmdBuffers[i]);
|
||||
}
|
||||
|
||||
drawUI(drawCmdBuffers[i]);
|
||||
|
||||
vkCmdEndRenderPass(drawCmdBuffers[i]);
|
||||
|
||||
VK_CHECK_RESULT(vkEndCommandBuffer(drawCmdBuffers[i]));
|
||||
|
|
@ -618,8 +611,6 @@ public:
|
|||
// UI overlay configuration needs to be adjusted for this example (renderpass setup, attachment count, etc.)
|
||||
virtual void OnSetupUIOverlay(vks::UIOverlayCreateInfo &createInfo)
|
||||
{
|
||||
createInfo.renderPass = uiRenderPass;
|
||||
createInfo.framebuffers = frameBuffers;
|
||||
createInfo.targetSubpass = 1;
|
||||
createInfo.subpassCount = 2;
|
||||
createInfo.attachmentCount = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue