From 2e7d91ea5a3c25f0cc8b7547461eb40f580f9219 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Sat, 30 Jun 2012 22:25:26 +0300 Subject: [PATCH] Only consider OpenGL ES contexes EGL_WINDOW_BIT is compared agaist wrong attribute --- src/x11_egl_opengl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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);