|
|
|
@ -773,9 +773,7 @@ bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info, VkRenderPass rend
|
|
|
|
|
g_CheckVkResultFn = info->CheckVkResultFn;
|
|
|
|
|
g_FramesDataBuffers.resize(info->QueuedFrames);
|
|
|
|
|
for (int i = 0; i < g_FramesDataBuffers.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
g_FramesDataBuffers[i] = FrameDataForRender();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ImGui_ImplVulkan_CreateDeviceObjects();
|
|
|
|
|
|
|
|
|
@ -795,18 +793,13 @@ void ImGui_ImplVulkan_NewFrame()
|
|
|
|
|
void ImGui_ImplVulkan_SetQueuedFramesCount(uint32_t count)
|
|
|
|
|
{
|
|
|
|
|
if (count == g_FramesDataBuffers.size())
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
ImGui_ImplVulkan_InvalidateFrameDeviceObjects();
|
|
|
|
|
|
|
|
|
|
uint32_t old_size = g_FramesDataBuffers.size();
|
|
|
|
|
g_FramesDataBuffers.resize(count);
|
|
|
|
|
for (uint32_t i = old_size; i < count; i++)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
g_FramesDataBuffers[i] = FrameDataForRender();
|
|
|
|
|
}
|
|
|
|
|
g_FrameIndex = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1043,16 +1036,12 @@ void ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(VkPhysicalDevice
|
|
|
|
|
check_vk_result(err);
|
|
|
|
|
|
|
|
|
|
for (uint32_t i = 0; i < wd->Frames.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
ImGui_ImplVulkanH_DestroyFrameData(g_Instance, device, &wd->Frames[i], allocator);
|
|
|
|
|
}
|
|
|
|
|
uint32_t old_size = wd->Frames.size();
|
|
|
|
|
wd->Frames.resize(wd->BackBufferCount);
|
|
|
|
|
for (uint32_t i = 0; i < wd->Frames.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
wd->Frames[i] = ImGui_ImplVulkanH_FrameData();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (old_swapchain)
|
|
|
|
|
vkDestroySwapchainKHR(device, old_swapchain, allocator);
|
|
|
|
|
|
|
|
|
|