Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 730fca2

Browse files
Auto-merge pull request #7585 from livecodeian/bugfix-23237
[[ Bug 23237 ]] Ensure Android EGL configuration supports GLES 3.x This patch updates the android OpenGLView class to request an EGL configuration that supports GLES 3.x. This prevents a crash in the Android x86 emulator when attempting to use gl functions that are not supported by the default configuration. Fixes https://quality.livecode.com/show_bug.cgi?id=23237
2 parents 713311c + e7c088c commit 730fca2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/notes/bugfix-23237.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix crash when using acceleratedRendering on Android x86 emulator

engine/src/java/com/runrev/android/OpenGLView.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class OpenGLView extends SurfaceView implements SurfaceHolder.Callback
3535
// Instance variables
3636

3737
private static final int EGL_CONTEXT_CLIENT_VERSION = 0x00003098;
38+
private static final int EGL_OPENGL_ES3_BIT = 0x00000040;
3839

3940
private EGL10 m_egl;
4041
private EGLDisplay m_egl_display;
@@ -78,6 +79,7 @@ private EGLConfig findConfig(int r, int g, int b, int a)
7879
{
7980
int[] t_config_spec;
8081
t_config_spec = new int[] {
82+
EGL10 . EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT,
8183
EGL10 . EGL_RED_SIZE, r,
8284
EGL10 . EGL_GREEN_SIZE, g,
8385
EGL10 . EGL_BLUE_SIZE, b,

0 commit comments

Comments
 (0)