OpenGLES 3 (Alpha testing)

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.

Where do I get it?

Download from our alpha page

Feedback

We’d like to know if you encounter any cases where the build doesn’t work for one reason or another.
Please specify platform, and OpenGL version

13 Likes

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?

5 Likes

I prepared a demo project to test possible cases.

How it looks if it runs without errors:

Windows 10 x64 - Screenshot

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:

  1. 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:
Samsung S10e - adb logcat

  1. 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.
Tecno Pop 2F - Chrome Remote Inspector logs

APK fails to run, too:

Tecno Pop 2F - adb logcat


Additionally, I built the demo on Defold 1.2.179 - html5 (and apk) runs fine on all my devices.

7 Likes

Thank you @aglitchman!

This is some really good info.

*) I’m not sure why bob suddenly wouldn’t work on xenial, since we didn’t change build server (ubuntu-18) since 2019. :thinking:

  1. Thanks! I’ll fix the shader and make a note of the sample keyword in the migration notes.

  2. 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.

3 Likes

I’ve updated the alpha build with some fixes:

  • 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.

7 Likes

Here is a sample of output from HTML5 build. Useful!

output

2 Likes

Thank you! I’ll PM you logs from the device.

1 Like

I just pushed the latest fixes for the OpenGLES update to CI and it’s currently building a new alpha build (done in ~45minutes).

After that, those of you that wanted the OpenGLES 2 fallbacks, please take a moment to verify that it still works for you with the latest alpha.

Edit:
It’s up now on https://d.defold.com/alpha/

5 Likes

38
This is how sprites & tiles look for me in alpha.
39

1 Like

Ah, yes theres another fix coming for that too.
Edit: It’s live on the d.defold.com/alpha now

1 Like

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.

3 Likes

Thanks for testing!

2 Likes