DrawList: fixed CloneOutput() taking a copy of the ImDrawListSharedData pointer. (#8894, #1860)

Amend b82e99c032
This commit is contained in:
ocornut
2025-08-20 17:48:03 +02:00
parent 720e94f3da
commit 0c4f50090a
2 changed files with 3 additions and 2 deletions

View File

@@ -478,9 +478,10 @@ void ImDrawList::_ClearFreeMemory()
_Splitter.ClearFreeMemory();
}
// Note: For multi-threaded rendering, consider using `imgui_threaded_rendering` from https://github.com/ocornut/imgui_club
ImDrawList* ImDrawList::CloneOutput() const
{
ImDrawList* dst = IM_NEW(ImDrawList(_Data));
ImDrawList* dst = IM_NEW(ImDrawList(NULL));
dst->CmdBuffer = CmdBuffer;
dst->IdxBuffer = IdxBuffer;
dst->VtxBuffer = VtxBuffer;