diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 02248cb591653af661285e341353b29647b6da82..213c971ada744a9989329d5aa4d1097b2729fd82 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -441,8 +441,23 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, if (temp_index > 0) { for (int i = 0; i < temp_index; i += 2) { - if (temp_attribs[i] == EGL_SAMPLES || temp_attribs[i] == EGL_SAMPLE_BUFFERS) - temp_attribs[i + 1] = 0; + switch (temp_attribs[i]) { + case EGL_RENDERABLE_TYPE: + //temp_attribs[i + 1] = EGL_OPENGL_ES2_BIT; + break; + case EGL_SURFACE_TYPE: + //temp_attribs[i + 1] = EGL_WINDOW_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT; + break; + case EGL_STENCIL_SIZE: + temp_attribs[i + 1] = 8; + break; + case EGL_SAMPLES: + case EGL_SAMPLE_BUFFERS: + temp_attribs[i + 1] = 0; + break; + default: + break; + } } } res = cnx->egl.eglChooseConfig(