Skip to content

Commit

Permalink
🚧 No longer render if window is minimized (Windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
elect86 committed Oct 7, 2018
1 parent 46f9ed0 commit 9aca68f
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 5 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions src/main/kotlin/vulkan/base/VulkanExampleBase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,8 @@ abstract class VulkanExampleBase {
window.loop {
/* Handle window messages. Resize events happen exactly here (before lambda).
So it is safe to use the new swapchain images and framebuffers afterwards. */
renderFrame()
if (!window.isIconified)
renderFrame()
}

// Flush device to make sure all resources can be freed
Expand Down Expand Up @@ -1036,10 +1037,11 @@ abstract class VulkanExampleBase {

device.waitIdle()

if (settings.overlay)
uiOverlay!!.resize(size, frameBuffers)

camera.updateAspectRatio(size.aspect)
if (newSize allGreaterThan 0) {
if (settings.overlay)
uiOverlay!!.resize(newSize, frameBuffers)
camera.updateAspectRatio(newSize.aspect)
}

// Notify derived class
windowResized()
Expand Down

0 comments on commit 9aca68f

Please sign in to comment.