From 7bdd81b0bb611850430fd0601fa658521c151621 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 16 Oct 2012 13:15:11 +0200 Subject: [PATCH] (Android) Seems to run now (with GLES 2 forced) - but just shows black right now --- gfx/context/androidegl_ctx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gfx/context/androidegl_ctx.c b/gfx/context/androidegl_ctx.c index 3f005e72c4..8341abeee0 100644 --- a/gfx/context/androidegl_ctx.c +++ b/gfx/context/androidegl_ctx.c @@ -84,6 +84,7 @@ void gfx_ctx_destroy(void) bool gfx_ctx_init(void) { const EGLint attribs[] = { + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_BLUE_SIZE, 8, EGL_GREEN_SIZE, 8, @@ -132,8 +133,14 @@ bool gfx_ctx_init(void) gfx_ctx_destroy(); return false; } + + EGLint ctx_attribs[] = + { + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL_NONE + }; - if (!(g_egl_ctx = eglCreateContext(g_egl_dpy, config, 0, 0))) { + if (!(g_egl_ctx = eglCreateContext(g_egl_dpy, config, 0, ctx_attribs))) { RARCH_ERR("eglCreateContext() returned error %d.\n", eglGetError()); gfx_ctx_destroy(); return false;