mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +00:00
Examples: DirectX9: Clarified texture release code (#1163)
This commit is contained in:
parent
32f5ef4f98
commit
51c200ac0d
@ -311,12 +311,13 @@ void ImGui_ImplDX9_InvalidateDeviceObjects()
|
||||
g_pIB->Release();
|
||||
g_pIB = NULL;
|
||||
}
|
||||
if (LPDIRECT3DTEXTURE9 tex = (LPDIRECT3DTEXTURE9)ImGui::GetIO().Fonts->TexID)
|
||||
{
|
||||
tex->Release();
|
||||
ImGui::GetIO().Fonts->TexID = 0;
|
||||
}
|
||||
|
||||
// At this point note that we set ImGui::GetIO().Fonts->TexID to be == g_FontTexture, so clear both.
|
||||
if (g_FontTexture)
|
||||
g_FontTexture->Release();
|
||||
g_FontTexture = NULL;
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.Fonts->TexID = NULL;
|
||||
}
|
||||
|
||||
void ImGui_ImplDX9_NewFrame()
|
||||
|
Loading…
Reference in New Issue
Block a user