diff --git a/example/common/VulkanAppFramework.h b/example/common/VulkanAppFramework.h index bc8e6d65..7d138508 100644 --- a/example/common/VulkanAppFramework.h +++ b/example/common/VulkanAppFramework.h @@ -327,6 +327,8 @@ public: if(win->IsVisible()) Draw(); + device->WaitIdle(); + return(true); } };//class VulkanApplicationFramework diff --git a/inc/hgl/graph/VKDevice.h b/inc/hgl/graph/VKDevice.h index b74822fa..e56010dd 100644 --- a/inc/hgl/graph/VKDevice.h +++ b/inc/hgl/graph/VKDevice.h @@ -96,6 +96,8 @@ public: const VkExtent2D & GetSwapchainSize ()const {return swapchainRT->GetExtent();} + void WaitIdle ()const {vkDeviceWaitIdle(attr->device);} + public: bool Resize (const VkExtent2D &);