diff --git a/src/x11_egl_opengl.c b/src/x11_egl_opengl.c index 923e3e22..7df15963 100644 --- a/src/x11_egl_opengl.c +++ b/src/x11_egl_opengl.c @@ -93,12 +93,19 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found) continue; } - if (!(getFBConfigAttrib(fbconfigs[i], EGL_RENDERABLE_TYPE) & EGL_WINDOW_BIT)) + if (!(getFBConfigAttrib(fbconfigs[i], EGL_SURFACE_TYPE) & EGL_WINDOW_BIT)) { // Only consider window EGLConfigs continue; } + if (!(getFBConfigAttrib(fbconfigs[i], EGL_RENDERABLE_TYPE) & EGL_OPENGL_ES_BIT) && + !(getFBConfigAttrib(fbconfigs[i], EGL_RENDERABLE_TYPE) & EGL_OPENGL_ES2_BIT)) + { + // Only consider OpenGL ES context + continue; + } + result[*found].redBits = getFBConfigAttrib(fbconfigs[i], EGL_RED_SIZE); result[*found].greenBits = getFBConfigAttrib(fbconfigs[i], EGL_GREEN_SIZE); result[*found].blueBits = getFBConfigAttrib(fbconfigs[i], EGL_BLUE_SIZE);