Backends: Using SetTexID() consistently instead of assigning to ->TexID. May make the later obsolete eventually.

This commit is contained in:
ocornut
2021-02-03 18:30:26 +01:00
parent 82a9b599ab
commit 58a0a7058c
12 changed files with 25 additions and 24 deletions

View File

@ -305,7 +305,7 @@ static void ImGui_ImplDX10_CreateFontsTexture()
}
// Store our identifier
io.Fonts->TexID = (ImTextureID)g_pFontTextureView;
io.Fonts->SetTexID((ImTextureID)g_pFontTextureView);
// Create texture sampler
{
@ -482,7 +482,7 @@ void ImGui_ImplDX10_InvalidateDeviceObjects()
return;
if (g_pFontSampler) { g_pFontSampler->Release(); g_pFontSampler = NULL; }
if (g_pFontTextureView) { g_pFontTextureView->Release(); g_pFontTextureView = NULL; ImGui::GetIO().Fonts->TexID = NULL; } // We copied g_pFontTextureView to io.Fonts->TexID so let's clear that as well.
if (g_pFontTextureView) { g_pFontTextureView->Release(); g_pFontTextureView = NULL; ImGui::GetIO().Fonts->SetTexID(NULL); } // We copied g_pFontTextureView to io.Fonts->TexID so let's clear that as well.
if (g_pIB) { g_pIB->Release(); g_pIB = NULL; }
if (g_pVB) { g_pVB->Release(); g_pVB = NULL; }