From 7e24ce0956a2d65df8a0a30661e493ca45276b2d Mon Sep 17 00:00:00 2001 From: omar Date: Thu, 22 Feb 2018 23:04:28 +0100 Subject: [PATCH] Examples: DirectX12: Fixed shutdown issue. (#301) --- examples/directx12_example/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/directx12_example/main.cpp b/examples/directx12_example/main.cpp index 7e6d6719..6a4b78d8 100644 --- a/examples/directx12_example/main.cpp +++ b/examples/directx12_example/main.cpp @@ -396,7 +396,7 @@ int main(int, char**) g_pd3dCommandList->ResourceBarrier(1, &barrier); g_pd3dCommandList->Close(); - g_pd3dCommandQueue->ExecuteCommandLists(1, (ID3D12CommandList* const*) &g_pd3dCommandList); + g_pd3dCommandQueue->ExecuteCommandLists(1, (ID3D12CommandList* const*)&g_pd3dCommandList); g_pSwapChain->Present(1, 0); // Present with vsync //g_pSwapChain->Present(0, 0); // Present without vsync @@ -407,9 +407,9 @@ int main(int, char**) frameCtxt->FenceValue = fenceValue; } + WaitForLastSubmittedFrame(); ImGui_ImplDX12_Shutdown(); ImGui::DestroyContext(); - CleanupDeviceD3D(); UnregisterClass(_T("ImGui Example"), wc.hInstance);