No longer render if window is minimized (Windows)

Refs #493
This commit is contained in:
saschawillems 2018-06-30 21:56:23 +02:00
parent 5e552c0fea
commit 1f42dbda61

View file

@ -304,7 +304,9 @@ void VulkanExampleBase::renderLoop()
break;
}
}
renderFrame();
if (!IsIconic(window)) {
renderFrame();
}
}
#elif defined(VK_USE_PLATFORM_ANDROID_KHR)
while (1)
@ -2172,12 +2174,13 @@ void VulkanExampleBase::windowResize()
vkDeviceWaitIdle(device);
if (settings.overlay) {
UIOverlay->resize(width, height, frameBuffers);
if ((width > 0.0f) && (height > 0.0f)) {
if (settings.overlay) {
UIOverlay->resize(width, height, frameBuffers);
}
camera.updateAspectRatio((float)width / (float)height);
}
camera.updateAspectRatio((float)width / (float)height);
// Notify derived class
windowResized();
viewChanged();