Fixes in examples: support swapchain image count change on resize, fix multiple validation layer errors on resize and quit, multiview now supports resize/fullscreen, computecloth deltaT now based on frame time, multisampling recreates attachments on resize, P key now pauses computeparticles, descriptorsets, and pushdescriptors

This commit is contained in:
Stephen Saunders 2022-06-01 13:02:33 -04:00
parent cb343c329a
commit 121612857c
10 changed files with 148 additions and 65 deletions

View file

@ -362,7 +362,7 @@ public:
if (!prepared)
return;
draw();
if (animate) {
if (animate && !paused) {
cubes[0].rotation.x += 2.5f * frameTimer;
if (cubes[0].rotation.x > 360.0f)
cubes[0].rotation.x -= 360.0f;
@ -370,7 +370,7 @@ public:
if (cubes[1].rotation.x > 360.0f)
cubes[1].rotation.x -= 360.0f;
}
if ((camera.updated) || (animate)) {
if ((camera.updated) || (animate && !paused)) {
updateUniformBuffers();
}
}
@ -383,4 +383,4 @@ public:
}
};
VULKAN_EXAMPLE_MAIN()
VULKAN_EXAMPLE_MAIN()