We’ve now updated our OpenGL backend to support OpenGLES 3 for mobile devices.
For HTML5, this means support for WebGL 2 (currently Chrome + Firefox).
The glsl shader model is 300 es
In order to support older devices/browsers, there are some runtime fallbacks:
Html5 has a fallback to WebGL 1
Android has a fallback to OpenGLES 2
For desktop, we target OpenGL 3.3 and glsl shader model 140
Texture format support
Using the higher OpenGL version will enable support for ETC2 on Android, and ASTC on iOS.
Maybe the profiler should list the currently used OpenGLES / WebGL versions? It being available in system info may be useful as well. We could use it to dynamically switch problem materials potentially?
I tested some projects and did not notice issues.
Spector.js shows version being used, but that might not be reliable?
By the way, CI can’t build the demo on the “xenial” distro - check the logs. I had to change “distro” to “bionic” to build it. Previous versions of bob.jar run well on “xenial”.
Issues:
DF fonts don’t work in the HTML5 build on WebGL 2.0. You can see the errors in your browser log. Additionally, I built .apk and tested the demo on my Samsung S10e (i.e. on a OpenGLES 3.0 device). Errors are almost the same:
The HTML5 demo doesn’t run on Tecno Pop 2F (Mali-400 GPU, WebGL 1.0, latest Chrome 88). Possible source of the issue is that the browser supports WebGL 2.0 (i.e. API exists), but the device doesn’t.
*) I’m not sure why bob suddenly wouldn’t work on xenial, since we didn’t change build server (ubuntu-18) since 2019.
Thanks! I’ll fix the shader and make a note of the sample keyword in the migration notes.
This is trickier. Not sure how to reproduce here. Is there a way to create a virtual device like that fails like this in Android Studio? I guess worst case, I’ll make a special build with lots of extra logging.
Issue 5551 - Added “display.display_device_info” to enable printout of the selected GPU device info at startup (ping @Pkeod)
Issue 5554 - Fixed editor compilation of shaders (for build-and-run) (and also the font-df.fp usage of the sample keyword.)
@aglitchman I’m currently preparing a branch here with lots of extra debug prints for Android, to see if we can pinpoint the issue for the Tecno Pop device.
My game is probably not the most demanding in terms of opengl, but is using DF and bitmap font extensively.
Everything is working fine, including webgl fallback.