seanchas116 / qtimgui

Qt (QOpenGLWidget / QOpenGLWindow) backend for ImGui
MIT License
375 stars 96 forks source link

Fix android #12

Closed pthom closed 4 years ago

pthom commented 4 years ago

With a few adpatations I could run your project under android!

I have tested it with arm and arm64, with the window and widget demos and ut runs perfectly.

Your project is seriously cool, and it is refreshing to be able to create a c++ app with 10 lines of code on a tablet.

cheers

seanchas116 commented 4 years ago

Thank you for the cool pull request! I don't have Android devices so I tried to run it in Android emulator but I got runtime errors and no ImGui window is shown:

E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5

I don't know why this error is happening. Do you know something about this? I tried it in both Mac and Windows, with latest Android Studio.

I think it's ok to support physical devices only but it would be nice if it runs on emulators as well.

pthom commented 4 years ago

Hello,

Thank you for your answer!

I cannot currently test on an emulator (my qt creator is installed on a virtual machine, and I cannot install an emulator on a virtual machine).

I suspect this is a limitation of OpenGL in an emulator:

May be you could uncheck the setting "Use host GPU". See
https://stackoverflow.com/questions/22348801/phonegap-eclipse-issue-eglcodeccommon-glutilsparamsize-unknow-param-errors and https://stackoverflow.com/questions/51767154/android-gradle-build-faild-with-this-error

https://stackoverflow.com/questions/39057187/android-app-error-glutilsparamsize-unknow-param

seanchas116 commented 4 years ago

Thank you! It's working 👍

image