Implement viewChanged() in multiple examples for proper window resize handling, fix triangle example resizing on macOS

This commit is contained in:
Stephen Saunders 2022-06-13 23:04:53 -04:00
parent b2f501dc98
commit 279c95422d
42 changed files with 240 additions and 37 deletions

View file

@ -643,6 +643,7 @@ public:
virtual void viewChanged()
{
camera.setPerspective(splitScreen ? 30.0f : 45.0f, (float)width / (float)(height * ((splitScreen) ? 0.5f : 1.0f)), 1.0f, 256.0f);
updateUniformBuffers();
}
@ -663,4 +664,4 @@ public:
}
};
VULKAN_EXAMPLE_MAIN()
VULKAN_EXAMPLE_MAIN()