ofxImGui
ofxImGui copied to clipboard
Update imgui_impl_glfw.cpp
Fix for Mac Intel build error error: cast of Objective-C pointer type 'id' to C pointer type 'void *' requires a bridged cast
Hi, thanks for finding and investigating this issue, but it's rather imgui related.
Did you submit the change to the imgui repo itself ?
I have some custom modifications with an update script, which does some necessary changes to improve compatibility with OF but I'd like to keep these minimal.
I did not as I thought it might be better served solving my own problem first. I can do that if you feel it more appropriate though.
To check if it's indeed an imgui bug, best would be to compile the glfw example of the imgui repo and see if you need the same change. Otherwise the bug is in the OpenFrameworks or the ofxImGui code and could be merged here.
Which versions of OpenFrameworks and operating system do you need this fix for ?
I'll look into this on the macOS side
Hi again @danoli3 @PeteHaughie , Sorry I forgot about this issue. Some time ago, I've addressed ARC support in 07d901e8622b34dd6f4d5aef0c79fd3c84093caf and created #134. Meanwhile, the code is not exactly the same as in your PR and I'm unsure about OBJ-C ARC stuff : https://github.com/jvcleave/ofxImGui/blob/5ffd80df379b6a4756a398d30d8a22ea9b260053/libs/imgui/backends/imgui_impl_glfw_arc_support.h#L22-L26
Should that become CFBridgingRetain ? (so it unwraps like your PR)
--> #define glfwGetCocoaWindow(X) CFBridgingRetain(glfwGetCocoaWindow(X))