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