Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS support #3

Open
pzoltowski opened this issue Jul 20, 2022 · 6 comments
Open

iOS support #3

pzoltowski opened this issue Jul 20, 2022 · 6 comments

Comments

@pzoltowski
Copy link

I'm trying to build this addon for iOS devices. On https://github.com/Daandelange/ofxImGui/ it says

"Try the latest ofxImGui legacy version 1.77, or try this untested transition commit"

I tried that and in imconfig.h set:

#define IMGUI_IMPL_OPENGL_LOADER_GLBINDING3 1
#define IMGUI_IMPL_OPENGL_ES3 1

also removed imgui backend files for glfw and opengl2 to move compilation forward but still ended up with rabbit hole of different compile errors.

Is there any older version of ofxSurfingImGui that should work on iOS devices? Is there any table what version of imgui and ofxImGui this addon (ofxSurfingImGui) requires?

I'm wondering if using imgui SDL backend is the better way to go instead of GLFW since the latter one is not supported mobile devices yet (android & iOS), but don't know much ofxSurfingImGui or ofxImgGui internals how much it depends on GLFW or OpenGL. Do you have any tips?

@moebiussurfing
Copy link
Owner

hey,
thanks for the testing.
did you tried ofxImGui itself on iOS? I mean without ofxSurfingImGui.

@pzoltowski
Copy link
Author

Just tried to run ofxImGui examples-ios (without ofxSurfingImgui) both using ofxImGui legacy version 1.77, or this untested transition commit" but didn't manage to compile - seems in both cases try to use GLFW even when in imconfig.h set:

#define IMGUI_IMPL_OPENGL_LOADER_GLBINDING3 1
#define IMGUI_IMPL_OPENGL_ES3 1
#define OFXIMGUI_ENABLE_OF_BINDINGS 1

so I guess probably will be hard to move forward unless GLFW add support for Android/iOS or ofxImGui switches imgui backend to SDL unfortunately.

@moebiussurfing
Copy link
Owner

This repo requires https://github.com/Daandelange/ofxImGui/ which is, if I am not wrong, a mirror/synced with https://github.com/jvcleave/ofxImGui/tree/develop.
(The develop branch from the original/legacy ofxImGui).

The first step is to make ofxImGui work itself.

This ofxSurfingImGui requires that Daandelange repo. Will not work at all with the legacy ofxImGui.
On the README you can see why is required vs the legacy ofxImGui.
Also, I am sorry, but I didn't tested that repo on iOS. Just on Windows and partially on macOS/Xcode.

There are some README files there, like DEV or something, with some details about compatibility, but I am not sure about it.

Can you open an issue to that repo asking Daandelange about iOS build?

https://github.com/Daandelange/ofxImGui/issues

Good luck, I'll be tunned into it.

@moebiussurfing
Copy link
Owner

hello @Daandelange , hope all well there?
do you know if your ofxImGui fork could work on iOS?
regards

@Daandelange
Copy link
Contributor

Hey, I have no idea and no iOS devices to test...
My guess would be that it doesn't work out of the box but it might with some fixes, depending on how you can/must launch ofApps on iOs. The particularity of this branch is that we moved to the official imgui-backends which, if supported, need to be deeply bound to the internal window-compositing and renderer instances.

  1. Binding the renderer : gles 1 & 2 is imgui-supported so that's a good sign. This part works on GLFW windows and should on other windowing systems.
    Maybe there's something to do with IMGUI_IMPL_OPENGL_ES2 ?
  2. Binding the windowing system : It seems to me that ofApp-iOs use UIKit to create windows... The imgui-iOs-example does so too, but the question is if UIKit can be bound both to oF and imgui, like GLFW windows on mac/linux/windows.

@Daandelange
Copy link
Contributor

Hey @pzoltowski there has been some progress : GLES works on RPI with the new OF backend. iOS should not be hard to get working, if you're still into this ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants