#60
Threaded Rendering: Is it safe to asynchronously call _RenderDrawData from another thread?
Is it safe to call the backend _RenderDrawData function from one thread (e.g. render), while another thread is executing ImGui calls (e.g. UI)?
I assume this is the point of this helper and that it is indeed safe, but it's not explicitly clear (to me, at least) from the usage instructions in imgui_threaded_rendering.h so I wanted to confirm. Or, are we expected to maintain a global ImGui mutex for all multi-threaded access?
I hope this is an appropriate place to post this question - apologies if not.
I realize this is ambiguous since this helper is a separate repro, but since the question is rather generic it would best be on imgui/ repro. See e.g. https://github.com/ocornut/imgui/issues/8532, https://github.com/ocornut/imgui/issues/1860, https://github.com/ocornut/imgui/issues/3515, https://github.com/ocornut/imgui/issues/8597
The imgui_threaded_rendering.h ensure you have access to a ImDrawData instance that's not used by the other threads/domains, so in theory yes.
However, two things: