pthom / hello_imgui

Hello, Dear ImGui: unleash your creativity in app development and prototyping
https://pthom.github.io/hello_imgui
MIT License
676 stars 103 forks source link

hello_imgui iOS and Android canvas rendering #19

Closed jrynkiew closed 3 years ago

jrynkiew commented 3 years ago

Hi pthom!

I have an issue with rendering using your imgui libray.

The application works great, and I used your imgui_manual project for source code hacking too :P but I have an issue when I am trying to draw in the background GL canvas, behind imGui on mobile phones. This issue is reproducible even on Firefox mobile emulation, like iOS 6, etc. It occurs on all mobile devices as far as I can tell.

Browser: Chrome/Firefox

Steps to Reproduce:

  1. Open new browser tab or window
  2. open DevTools console (F12 is standard binding)
  3. Open link https://jrpc.pl (You need to open Dev Tools first, as once the app is loaded you can't use the F12 binding anymore - my app catches and overrides that binding - you can still open DevTools normally through browser interface however that's a hassle :P)
  4. Go to mobile emulation in Google Chrome or Firefox (I haven't tested other browsers)
  5. enable mobile emulation and test the different options

Expected Result: The jrpc.pl website should load the same as on Desktop monitors/computers

Actual Behaviour: The background canvas behind the imgui interface is scaled down and placed in the bottom left corner. This applies to all browser tests and physical device tests I performed on iOS (iPhone6s) and Android (Blackberry Key2)

jrynkiew commented 3 years ago

I seem to have solved my issue, I was mistakenly rendering 3D models and drawing clear color on background at the same time and mobile emscripten devices couldnt handle it. Case closed