Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[[ 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.
  • Loading branch information
livecodeian committed Jun 16, 2021
commit 71e5c6c107bcbbf2405051f4855911cddae98808
2 changes: 2 additions & 0 deletions engine/src/java/com/runrev/android/OpenGLView.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class OpenGLView extends SurfaceView implements SurfaceHolder.Callback
// Instance variables

private static final int EGL_CONTEXT_CLIENT_VERSION = 0x00003098;
private static final int EGL_OPENGL_ES3_BIT = 0x00000040;

private EGL10 m_egl;
private EGLDisplay m_egl_display;
Expand Down Expand Up @@ -78,6 +79,7 @@ private EGLConfig findConfig(int r, int g, int b, int a)
{
int[] t_config_spec;
t_config_spec = new int[] {
EGL10 . EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT,
EGL10 . EGL_RED_SIZE, r,
EGL10 . EGL_GREEN_SIZE, g,
EGL10 . EGL_BLUE_SIZE, b,
Expand Down