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

Working on Android? (regarding latest version of imguI) #3826

Closed
playingoDEERUX opened this issue Feb 18, 2021 · 5 comments
Closed

Working on Android? (regarding latest version of imguI) #3826

playingoDEERUX opened this issue Feb 18, 2021 · 5 comments
Labels

Comments

@playingoDEERUX
Copy link

Hey, uhh just a quick question actually:
Is this repository (the official repo of imgui) compatible with Android & Android SDK out of the box?

Thanks.

@PathogenDavid
Copy link
Contributor

Short answer: Yes, but batteries are not included.

Dear ImGui its self is platform agnostic and depends on using an appropriate backend to handle platform-specific concerns. This repo contains a handful of generic backends, but you can also pretty easily make your own.

My understanding is that the SDL and and OpenGL3 backends can be used with Android, but I can't say I've ever tried it myself.

There was some talk of having an Android example that would work out of the box, but I don't believe it went anywhere.

It is worth noting that while Dear ImGui does work with touch-centric devices, its heritage definitely makes it more well-suited for mouse-centric devices. (For example, Dear ImGui does not support multi-touch #3711 and interacting with the soft keyboard can be difficult #3817 #3275)

@playingoDEERUX
Copy link
Author

How do I get started? I have hooked a drawing function on a game which uses OpenGLES 2 and it now gets redirected to my call.

My first attempt was using imgui_impl_opengl3 since that one has OpenGLES 2 version integrated, then I also used imgui_impl_glfw however I start to see the first issues. I get weird errors like: fatal error: 'GL/glfw.h' file not found
#include <GL/glfw.h> or even if I change the directory so that it gets included, it then complains about glx.h not being found??!

Thanks in advance if you would have any idea. I am currently doing ImGui_ImplOpenGL3_Init(); however that will cause a crash without initialization of glfw.

@playingoDEERUX
Copy link
Author

playingoDEERUX commented Mar 2, 2021

Check #3860 this person just apparently has the same issue on the latest version, it doesn't wanna let us introduce glfw with OpenGL3??!

@ocornut
Copy link
Owner

ocornut commented Mar 2, 2021

Note there's a native Android backend PR in the work #3446 which is likely to be merged soon.

@ocornut
Copy link
Owner

ocornut commented Mar 4, 2021

Update:

I think we can close this and we will aim at tweaking and merging the equivalent of #421 as well.

@ocornut ocornut closed this as completed Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants