# OpenGLES 3 (Alpha testing)

**URL:** <https://forum.defold.com/t/opengles-3-alpha-testing/67495>\
**Category:** Announcements\
**Created:** [February 8, 2021, 12:23pm UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495 "2021-02-08T12:23:45Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 8, 2021, 12:23pm UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/1 "2021-02-08T12:23:45Z")

</div>

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](http://d.defold.com/alpha/)

# 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

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 8, 2021, 12:23pm UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/2 "2021-02-08T12:23:59Z")

</div>



---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [February 9, 2021, 5:01am UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/3 "2021-02-09T05:01:14Z")

</div>

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?

 ![html](https://forum-defold.b-cdn.net/uploads/default/original/3X/f/5/f5055e187f55c21860ec626e541d4e8a7970e8b6.png)

---

<div class="post-metadata">

**Author:** ![aglitchman](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/aglitchman/32/19432_2.png) [@aglitchman](https://forum.defold.com/u/aglitchman)\
**Post date:** [February 9, 2021, 5:51pm UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/4 "2021-02-09T17:51:25Z")

</div>

I prepared a demo project to test possible cases.

- **[Source code](https://github.com/aglitchman/defold-webgl1-fallback-test)**
- **[Online demo](https://aglitchman.github.io/defold-webgl1-fallback-test/)**.

How it looks if it runs without errors:

> **Windows 10 x64 - Screenshot**
>
> ![image](https://forum-defold.b-cdn.net/uploads/default/original/3X/b/c/bc3b97b34e54981c7c8d5aefd4b960a0de60fb8b.png)

_By the way, CI can’t build the demo on the “xenial” distro - [check the logs](https://travis-ci.com/github/aglitchman/defold-webgl1-fallback-test/builds/216563091). 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**
>
> ![image](https://forum-defold.b-cdn.net/uploads/default/original/3X/e/8/e8a48ff5848d043f7de03d077ccf2447729477f5.png)

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**
>
> ![180%20ALPHA](https://forum-defold.b-cdn.net/uploads/default/original/3X/c/4/c486c5d4856bb0f0474f913128759503cfa5e647.png)

APK fails to run, too:

> **Tecno Pop 2F - adb logcat**
>
> ![image](https://forum-defold.b-cdn.net/uploads/default/original/3X/3/5/35888477523210796f8981543b999204418d0b8c.png)

* * *

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

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 10, 2021, 7:33am UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/5 "2021-02-10T07:33:58Z")

</div>

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

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.

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 12, 2021, 10:38am UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/6 "2021-02-12T10:38:22Z")

</div>

I’ve updated the [alpha build](https://d.defold.com/alpha/) with some fixes:

- [Issue 5551](https://github.com/defold/defold/issues/5551) - Added “display.display\_device\_info” to enable printout of the selected GPU device info at startup (ping @Pkeod)
- [Issue 5554](https://github.com/defold/defold/issues/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](https://github.com/defold/defold/actions/runs/560722660) with lots of extra debug prints for Android, to see if we can pinpoint the issue for the Tecno Pop device.

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [February 12, 2021, 11:01am UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/7 "2021-02-12T11:01:55Z")

</div>

> [@Mathias\_Westerdahl](#):
>
> display.display\_device\_info

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

 ![output](https://forum-defold.b-cdn.net/uploads/default/original/3X/4/1/414b61286e8340cc3194c85210fb9af250393049.png)

---

<div class="post-metadata">

**Author:** ![aglitchman](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/aglitchman/32/19432_2.png) [@aglitchman](https://forum.defold.com/u/aglitchman)\
**Post date:** [February 12, 2021, 11:31am UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/8 "2021-02-12T11:31:33Z")

</div>

> [@Mathias\_Westerdahl](#):
>
> @aglitchman I’m currently preparing a branch [here](https://github.com/defold/defold/actions/runs/560722660) with lots of extra debug prints for Android, to see if we can pinpoint the issue for the Tecno Pop device.

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

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 15, 2021, 1:10pm UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/9 "2021-02-15T13:10:46Z")

</div>

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/](https://d.defold.com/alpha/)

---

<div class="post-metadata">

**Author:** ![dmitriy](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dmitriy/32/18452_2.png) [@dmitriy](https://forum.defold.com/u/dmitriy)\
**Post date:** [February 16, 2021, 7:59pm UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/10 "2021-02-16T19:59:17Z")

</div>

![38](https://forum-defold.b-cdn.net/uploads/default/original/3X/2/f/2fd78f0aefeb1e72140b1f751d0e75aa0bf851db.png)  
This is how sprites & tiles look for me in alpha.  
 ![39](https://forum-defold.b-cdn.net/uploads/default/original/3X/3/5/35ac07c8c290aac6a5150f2000112e4553bc63b8.png)

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 17, 2021, 6:15am UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/11 "2021-02-17T06:15:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gianmichele](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gianmichele/32/24028_2.png) [@gianmichele](https://forum.defold.com/u/gianmichele)\
**Post date:** [February 17, 2021, 7:59am UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/12 "2021-02-17T07:59:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [February 17, 2021, 8:02am UTC](https://forum.defold.com/t/opengles-3-alpha-testing/67495/13 "2021-02-17T08:02:31Z")

</div>

Thanks for testing!
