Hi there, I’m trying to add a second “preview” window to my app. The main window has an ImGui UI in it, and when I create a second window (which just displays a texture/FBO), I start to get problems. I think this is because the ImGui context gets mixed up between the two windows.
I see the Options flag
autoRender, which prevents
ImGui::Render() from being called automatically. So I figured I could insert them at the appropriate places, for my main window. However, it seems the Cinder implementation does some extra stuff, which is probably important to co-exist with Cinder (the default implementation calls
ImGui_ImplCinder_PostDraw(), which are hidden (static) functions in CinderImGui.cpp, so I can’t directly call them where I need to. They do call
ImGui::Render(), but also do other things…
Any tips on the right way to do this? If necessary, I can try to extract out a minimal repro example, but maybe someone has run into this before.
P.S. Things “mostly” seem to be working fine when I open the new window (leaving
autoRender at the default value of true), but definitely get screwed up when I move the second preview window to a different display. Also, when I close the second window it crashes, because the ImGui code is trying to access an invalid/destroyed Window.