mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 20:48:46 +02:00
Viewport: Give a chance to platform and renderer to actually destroy their data. Otherwise the regular ImplXXX_Shutdown + following by DestroyContext() order fails to fullifl this. (#1542)
This commit is contained in:
@ -611,6 +611,7 @@ void ImGui_ImplDX10_InitPlatformInterface()
|
||||
|
||||
void ImGui_ImplDX10_ShutdownPlatformInterface()
|
||||
{
|
||||
ImGui::DestroyViewportsRendererData(ImGui::GetCurrentContext());
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
memset(&io.RendererInterface, 0, sizeof(io.RendererInterface));
|
||||
}
|
||||
|
@ -619,6 +619,7 @@ void ImGui_ImplDX11_InitPlatformInterface()
|
||||
|
||||
void ImGui_ImplDX11_ShutdownPlatformInterface()
|
||||
{
|
||||
ImGui::DestroyViewportsRendererData(ImGui::GetCurrentContext());
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
memset(&io.RendererInterface, 0, sizeof(io.RendererInterface));
|
||||
}
|
||||
|
@ -763,6 +763,7 @@ void ImGui_ImplDX12_InitPlatformInterface()
|
||||
|
||||
void ImGui_ImplDX12_ShutdownPlatformInterface()
|
||||
{
|
||||
ImGui::DestroyViewportsRendererData(ImGui::GetCurrentContext());
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
memset(&io.RendererInterface, 0, sizeof(io.RendererInterface));
|
||||
}
|
||||
|
@ -327,6 +327,7 @@ void ImGui_ImplOpenGL3_InitPlatformInterface()
|
||||
|
||||
void ImGui_ImplOpenGL3_ShutdownPlatformInterface()
|
||||
{
|
||||
ImGui::DestroyViewportsRendererData(ImGui::GetCurrentContext());
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
memset(&io.RendererInterface, 0, sizeof(io.RendererInterface));
|
||||
}
|
||||
|
Reference in New Issue
Block a user