Viewport, Platform, Examples: Changes to resizing flow + restored support for Platform events affecting the ImGui windows (so Decorated windows are functional). (#1542, #1042) ..

SDL: Added platform move/resize/close support.
GLFW: Added platform move/resize support. Moved Close to use callback for consistency.
Win32:
Vulkan: Fixed resize support.
Naming is WIP "PlatforrmRequestXXX" is too ambiguous. Basically we either have a ImGui->Platform flow or a Platform->ImGui flow. Working a bigger refactor now.
This commit is contained in:
omar
2018-03-15 10:54:27 +01:00
parent 207ad45983
commit 6e58a95a01
6 changed files with 90 additions and 34 deletions

View File

@ -1108,8 +1108,9 @@ static void ImGui_ImplVulkan_DestroyViewport(ImGuiViewport* viewport)
static void ImGui_ImplVulkan_ResizeViewport(ImGuiViewport* viewport, ImVec2 size)
{
ImGuiPlatformDataVulkan* data = (ImGuiPlatformDataVulkan*)viewport->RendererUserData;
ImGui_ImplVulkan_WindowData* wd = &data->WindowData;
ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, wd, g_Allocator, (int)size.x, (int)size.y);
if (data == NULL) // This is NULL for the main viewport (which is left to the user/app to handle)
return;
ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, &data->WindowData, g_Allocator, (int)size.x, (int)size.y);
}
static void ImGui_ImplVulkan_RenderViewport(ImGuiViewport* viewport)