diff options
author | Jesse Hall <jessehall@google.com> | 2014-04-21 19:46:01 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-04-21 19:46:01 +0000 |
commit | 43cea7eadbcb3930887eadfa3f278e1a666449d0 (patch) | |
tree | e4215a4ee505e519189d56742b8c97dbcedf12d7 /opengl | |
parent | 6788110191fc457169d8268a4c25e1845d05ee07 (diff) | |
parent | 650a8860d9732accd938a32f99179cc86f101ef4 (diff) | |
download | frameworks_base-43cea7eadbcb3930887eadfa3f278e1a666449d0.zip frameworks_base-43cea7eadbcb3930887eadfa3f278e1a666449d0.tar.gz frameworks_base-43cea7eadbcb3930887eadfa3f278e1a666449d0.tar.bz2 |
am 650a8860: am fc3c6a0e: Merge "EGL_OPENGL_ES3_BIT_KHR is set as ES 3 context is requested."
* commit '650a8860d9732accd938a32f99179cc86f101ef4':
EGL_OPENGL_ES3_BIT_KHR is set as ES 3 context is requested.
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/java/android/opengl/GLSurfaceView.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java index 5a2e261..4c024ae 100644 --- a/opengl/java/android/opengl/GLSurfaceView.java +++ b/opengl/java/android/opengl/GLSurfaceView.java @@ -882,7 +882,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback protected int[] mConfigSpec; private int[] filterConfigSpec(int[] configSpec) { - if (mEGLContextClientVersion != 2) { + if (mEGLContextClientVersion != 2 && mEGLContextClientVersion != 3) { return configSpec; } /* We know none of the subclasses define EGL_RENDERABLE_TYPE. @@ -892,7 +892,11 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback int[] newConfigSpec = new int[len + 2]; System.arraycopy(configSpec, 0, newConfigSpec, 0, len-1); newConfigSpec[len-1] = EGL10.EGL_RENDERABLE_TYPE; - newConfigSpec[len] = 4; /* EGL_OPENGL_ES2_BIT */ + if (mEGLContextClientVersion == 2) { + newConfigSpec[len] = EGL14.EGL_OPENGL_ES2_BIT; /* EGL_OPENGL_ES2_BIT */ + } else { + newConfigSpec[len] = EGLExt.EGL_OPENGL_ES3_BIT_KHR; /* EGL_OPENGL_ES3_BIT_KHR */ + } newConfigSpec[len+1] = EGL10.EGL_NONE; return newConfigSpec; } |