From 921ed14a87bd47e1b18c51d497636df82680b822 Mon Sep 17 00:00:00 2001 From: folecr Date: Wed, 3 Jul 2013 15:08:07 -0700 Subject: [PATCH] Use OpenGLES 2.0 --- cocos2dx/platform/android/nativeactivity.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cocos2dx/platform/android/nativeactivity.cpp b/cocos2dx/platform/android/nativeactivity.cpp index 61f860db27..b8b59171d2 100644 --- a/cocos2dx/platform/android/nativeactivity.cpp +++ b/cocos2dx/platform/android/nativeactivity.cpp @@ -146,7 +146,14 @@ static cocos_dimensions engine_init_display(struct engine* engine) { ANativeWindow_setBuffersGeometry(engine->app->window, 0, 0, format); surface = eglCreateWindowSurface(display, config, engine->app->window, NULL); - context = eglCreateContext(display, config, NULL, NULL); + + const EGLint eglContextAttrs[] = + { + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL_NONE + }; + + context = eglCreateContext(display, config, NULL, eglContextAttrs); if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE) { LOGW("Unable to eglMakeCurrent");