Open miko007 opened 4 years ago
Hi @miko007, thanks for the report. Unfortunately, I don't have access to a mac with Xcode to replicate this issue at the moment.
However, using the window's draw signal would prevent the use of Dear ImGui
in the app update()
function (a common pattern for small apps/samples). Using ImGui::
functions there would then also result in the same g.WithinFrameScope
assertion error.
A platform-specific fix may instead affect the ImGui_ImplCinder_Resize
or the ImGui_ImplCinder_NewFrameGuard
functions, but hard to tell from afar.
that is correct, while i am not shure why one could not do the gui in App::draw()
instead, because thats what it is for, right?
But if that is a concern, i am not really shure how to proceed from here, as ImGui is pretty much not usable on macOS without the fix...
Got my hands on a Mac so I'll be able to take a look soon.
I also noticed this issue on macOS when trying out Cinder. I rebuilt the library with the patch from #2178 and resizing (with ImGui) seem to work fine now!
If one resizes the window on macOS and ImGui is used, the cinder app crashes, because the assertion
g.WithinFrameScope
fails. To fix this, line528
(commit cd1d70191a4a62e9a303c620271e0341758cdf04) insrc/cinder/CinderImGui.cpp
https://github.com/cinder/Cinder/blob/cd1d70191a4a62e9a303c620271e0341758cdf04/src/cinder/CinderImGui.cpp#L528 hast to be changed to
As of the huge backlog of pull requests, i will not open another one. Maybe one of the developers can implement this little fix directly.