mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
Backends: DX10, DX11: avoid ImGui_ImplXXXX_SwapBuffers() handlers for secondary viewports crashing if SwapChain could not be created.
It's not really clear when that would fail but someone privately reported, and since we allow failure in ImGui_ImplDX11_CreateWindow() it makes sense to allow it here.
This commit is contained in:
parent
cab82d9c76
commit
8de97d14d8
3 changed files with 6 additions and 2 deletions
|
|
@ -770,7 +770,8 @@ static void ImGui_ImplDX10_RenderViewport(ImGuiViewport* viewport, void*)
|
|||
static void ImGui_ImplDX10_SwapBuffers(ImGuiViewport* viewport, void*)
|
||||
{
|
||||
ImGui_ImplDX10_ViewportData* vd = (ImGui_ImplDX10_ViewportData*)viewport->RendererUserData;
|
||||
vd->SwapChain->Present(0, 0); // Present without vsync
|
||||
if (vd->SwapChain)
|
||||
vd->SwapChain->Present(0, 0); // Present without vsync
|
||||
}
|
||||
|
||||
void ImGui_ImplDX10_InitMultiViewportSupport()
|
||||
|
|
|
|||
|
|
@ -800,7 +800,8 @@ static void ImGui_ImplDX11_RenderWindow(ImGuiViewport* viewport, void*)
|
|||
static void ImGui_ImplDX11_SwapBuffers(ImGuiViewport* viewport, void*)
|
||||
{
|
||||
ImGui_ImplDX11_ViewportData* vd = (ImGui_ImplDX11_ViewportData*)viewport->RendererUserData;
|
||||
vd->SwapChain->Present(0, 0); // Present without vsync
|
||||
if (vd->SwapChain)
|
||||
vd->SwapChain->Present(0, 0); // Present without vsync
|
||||
}
|
||||
|
||||
static void ImGui_ImplDX11_InitMultiViewportSupport()
|
||||
|
|
|
|||
|
|
@ -142,6 +142,8 @@ Docking+Viewports Branch:
|
|||
backends have been shutdown since 1.90.4. Changed into asserts. (#7175, #8945)
|
||||
- Backends: DX10, DX11, DX12: Disabled DXGI's Alt+Enter default behavior on secondary
|
||||
viewports managed by the backend. (#4350) [@PathogenDavid]
|
||||
- Backends: DX10, DX11: avoid ImGui_ImplXXXX_SwapBuffers() handlers for secondary
|
||||
viewports crashing if SwapChain could not be created.
|
||||
- Backends: Vulkan: Added a way to configure secondary viewport pipelinen creation
|
||||
by setting init_info.PipelineInfoForViewports fields. (#8946, #8110, #8111, #8686)
|
||||
- Backends: Vulkan: Added a way to configure secondary viewport swapchain VkImageUsageFlags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue