diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-08-12 04:44:08 -0500 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-08-12 04:44:08 -0500 |
| commit | 958590beaa18208b13811f15e6e081a3ebb31202 (patch) | |
| tree | ca1fc93a6564db8dda2b4a2e80a831b4d534f4e9 /Source/Android/src | |
| parent | 4c22e1264e0f59ae3ccc357d8d7ef178fa99f044 (diff) | |
[Android] Fix OpenGL ES 3 detection on Nexus 10. Nexus 10 defaults to GLES1 context when not specified while Adreno defaults to GLES2. Thanks to Jeremy D Miller for noticing and finding out why this was failing.
Diffstat (limited to 'Source/Android/src')
| -rw-r--r-- | Source/Android/src/org/dolphinemu/dolphinemu/PrefsFragment.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/PrefsFragment.java b/Source/Android/src/org/dolphinemu/dolphinemu/PrefsFragment.java index 1263c03798..daf9aeb1c6 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/PrefsFragment.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/PrefsFragment.java @@ -38,13 +38,18 @@ public class PrefsFragment extends PreferenceFragment { EGL10.EGL_RENDERABLE_TYPE, 4, EGL10.EGL_NONE }; + int EGL_CONTEXT_CLIENT_VERSION = 0x3098; + int[] ctx_attribs = new int[] { + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL10.EGL_NONE + }; // No error checking performed, minimum required code to elucidate logic mEGL = (EGL10) EGLContext.getEGL(); mEGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); mEGL.eglInitialize(mEGLDisplay, version); mEGLConfig = chooseConfig(); // Choosing a config is a little more complicated - mEGLContext = mEGL.eglCreateContext(mEGLDisplay, mEGLConfig, EGL10.EGL_NO_CONTEXT, null); + mEGLContext = mEGL.eglCreateContext(mEGLDisplay, mEGLConfig, EGL10.EGL_NO_CONTEXT, ctx_attribs); mEGLSurface = mEGL.eglCreatePbufferSurface(mEGLDisplay, mEGLConfig, attribList); mEGL.eglMakeCurrent(mEGLDisplay, mEGLSurface, mEGLSurface, mEGLContext); mGL = (GL10) mEGLContext.getGL(); |
