mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Examples: DirectX9/10/11: Taking reference to device + subsequent merge of this in docking will fix DX9 issue #2524
This commit is contained in:
parent
6c196cf432
commit
d88121ff5b
3 changed files with 8 additions and 4 deletions
|
|
@ -500,6 +500,7 @@ bool ImGui_ImplDX10_Init(ID3D10Device* device)
|
|||
}
|
||||
if (pDXGIDevice) pDXGIDevice->Release();
|
||||
if (pDXGIAdapter) pDXGIAdapter->Release();
|
||||
g_pd3dDevice->AddRef();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -508,7 +509,7 @@ void ImGui_ImplDX10_Shutdown()
|
|||
{
|
||||
ImGui_ImplDX10_InvalidateDeviceObjects();
|
||||
if (g_pFactory) { g_pFactory->Release(); g_pFactory = NULL; }
|
||||
g_pd3dDevice = NULL;
|
||||
if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = NULL; }
|
||||
}
|
||||
|
||||
void ImGui_ImplDX10_NewFrame()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue