mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
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:
@ -288,7 +288,6 @@ bool ImGui_ImplDX9_Init(void* hwnd, IDirect3DDevice9* device)
|
||||
void ImGui_ImplDX9_Shutdown()
|
||||
{
|
||||
ImGui_ImplDX9_InvalidateDeviceObjects();
|
||||
ImGui::Shutdown();
|
||||
g_pd3dDevice = NULL;
|
||||
g_hWnd = 0;
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ int main(int, char**)
|
||||
}
|
||||
|
||||
// Setup ImGui binding
|
||||
ImGui::CreateContext();
|
||||
ImGui_ImplDX9_Init(hwnd, g_pd3dDevice);
|
||||
|
||||
// Setup style
|
||||
@ -173,6 +174,8 @@ int main(int, char**)
|
||||
}
|
||||
|
||||
ImGui_ImplDX9_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
|
||||
if (g_pd3dDevice) g_pd3dDevice->Release();
|
||||
if (pD3D) pD3D->Release();
|
||||
UnregisterClass(_T("ImGui Example"), wc.hInstance);
|
||||
|
Reference in New Issue
Block a user