IO: added ImGuiPlatformIO::ClearPlatformHandlers(), ClearRendererHandlers(). Backends: call those on Shutdown(). (#8945, #2769)

This commit is contained in:
ocornut
2025-09-18 16:58:50 +02:00
parent 0e7cd694eb
commit d4f722d5b2
21 changed files with 95 additions and 2 deletions
+7
View File
@@ -3970,6 +3970,13 @@ struct ImGuiPlatformIO
// Textures list (the list is updated by calling ImGui::EndFrame or ImGui::Render)
// The ImGui_ImplXXXX_RenderDrawData() function of each backend generally access this via ImDrawData::Textures which points to this. The array is available here mostly because backends will want to destroy textures on shutdown.
ImVector<ImTextureData*> Textures; // List of textures used by Dear ImGui (most often 1) + contents of external texture list is automatically appended into this.
//------------------------------------------------------------------
// Functions
//------------------------------------------------------------------
void ClearPlatformHandlers(); // Clear all Platform_XXX fields. Typically called on Platform Backend shutdown.
void ClearRendererHandlers(); // Clear all Renderer_XXX fields. Typically called on Renderer Backend shutdown.
};
// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. Handler is called during EndFrame().