Examples: Updated for reorganized context functions. Calling CreateContext(), DestroyContext() in example code. Removed Shutdown() from binding code. (#1565, #586, #992, #1007, #1558)

This commit is contained in:
omar
2018-01-21 20:09:30 +01:00
parent 5e2aa6185c
commit d3e826c247
21 changed files with 31 additions and 15 deletions

View File

@ -569,7 +569,6 @@ bool ImGui_ImplDX10_Init(void* hwnd, ID3D10Device* device)
void ImGui_ImplDX10_Shutdown()
{
ImGui_ImplDX10_InvalidateDeviceObjects();
ImGui::Shutdown();
g_pd3dDevice = NULL;
g_hWnd = (HWND)0;
}

View File

@ -122,6 +122,7 @@ int main(int, char**)
UpdateWindow(hwnd);
// Setup ImGui binding
ImGui::CreateContext();
ImGui_ImplDX10_Init(hwnd, g_pd3dDevice);
// Setup style
@ -204,6 +205,8 @@ int main(int, char**)
}
ImGui_ImplDX10_Shutdown();
ImGui::DestroyContext();
CleanupDeviceD3D();
UnregisterClass(_T("ImGui Example"), wc.hInstance);