Implement viewChanged() in multiple examples for proper window resize handling, fix triangle example resizing on macOS
This commit is contained in:
parent
b2f501dc98
commit
279c95422d
42 changed files with 240 additions and 37 deletions
|
|
@ -334,6 +334,12 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
virtual void viewChanged()
|
||||
{
|
||||
camera.setPerspective(60.0f, (float)(width / 3.0f) / (float)height, 0.1f, 256.0f);
|
||||
updateUniformBuffers();
|
||||
}
|
||||
|
||||
virtual void OnUpdateUIOverlay(vks::UIOverlay *overlay)
|
||||
{
|
||||
if (!deviceFeatures.fillModeNonSolid) {
|
||||
|
|
@ -344,4 +350,4 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
VULKAN_EXAMPLE_MAIN()
|
||||
VULKAN_EXAMPLE_MAIN()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue