Streamlined UI overlay, code cleanup

Refs #496
This commit is contained in:
saschawillems 2018-08-31 21:15:43 +02:00
parent c1c4f06a23
commit 69c3f62b9a
7 changed files with 75 additions and 131 deletions

View file

@ -97,6 +97,7 @@ public:
camera.setRotation(glm::vec3(-12.75f, 380.0f, 0.0f));
camera.setPerspective(60.0f, (float)width / (float)height, 0.1f, 256.0f);
settings.overlay = true;
UIOverlay.subpass = 1;
}
~VulkanExample()
@ -608,19 +609,6 @@ public:
}
}
// UI overlay configuration needs to be adjusted for this example (renderpass setup, attachment count, etc.)
virtual void OnSetupUIOverlay(vks::UIOverlayCreateInfo &createInfo)
{
createInfo.targetSubpass = 1;
createInfo.subpassCount = 2;
createInfo.attachmentCount = 1;
createInfo.clearValues = {
{ { 0.0f, 0.0f, 0.0f, 0.0f } },
{ { 0.0f, 0.0f, 0.0f, 0.0f } },
{ { 1.0f, 0 } },
};
}
virtual void OnUpdateUIOverlay(vks::UIOverlay *overlay)
{
if (overlay->header("Settings")) {