ofxImGui icon indicating copy to clipboard operation
ofxImGui copied to clipboard

Update imgui_impl_glfw.cpp

Open PeteHaughie opened this issue 1 year ago • 4 comments
trafficstars

Fix for Mac Intel build error error: cast of Objective-C pointer type 'id' to C pointer type 'void *' requires a bridged cast

PeteHaughie avatar Jul 15 '24 23:07 PeteHaughie

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.

Daandelange avatar Jul 16 '24 10:07 Daandelange

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.

PeteHaughie avatar Jul 16 '24 14:07 PeteHaughie

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 ?

Daandelange avatar Jul 28 '24 13:07 Daandelange

I'll look into this on the macOS side

danoli3 avatar Aug 01 '24 12:08 danoli3

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))

Daandelange avatar Jul 16 '25 07:07 Daandelange