mirror of https://github.com/axmolengine/axmol.git
Use OpenGLES 2.0
This commit is contained in:
parent
9da4b9798f
commit
921ed14a87
|
@ -146,7 +146,14 @@ static cocos_dimensions engine_init_display(struct engine* engine) {
|
||||||
ANativeWindow_setBuffersGeometry(engine->app->window, 0, 0, format);
|
ANativeWindow_setBuffersGeometry(engine->app->window, 0, 0, format);
|
||||||
|
|
||||||
surface = eglCreateWindowSurface(display, config, engine->app->window, NULL);
|
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) {
|
if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE) {
|
||||||
LOGW("Unable to eglMakeCurrent");
|
LOGW("Unable to eglMakeCurrent");
|
||||||
|
|
Loading…
Reference in New Issue