1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Only consider OpenGL ES contexes

EGL_WINDOW_BIT is compared agaist wrong attribute
This commit is contained in:
Jari Vetoniemi 2012-06-30 22:25:26 +03:00
parent 5cf8b8d3fa
commit 2e7d91ea5a

View File

@ -93,12 +93,19 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
continue; 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 // Only consider window EGLConfigs
continue; 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].redBits = getFBConfigAttrib(fbconfigs[i], EGL_RED_SIZE);
result[*found].greenBits = getFBConfigAttrib(fbconfigs[i], EGL_GREEN_SIZE); result[*found].greenBits = getFBConfigAttrib(fbconfigs[i], EGL_GREEN_SIZE);
result[*found].blueBits = getFBConfigAttrib(fbconfigs[i], EGL_BLUE_SIZE); result[*found].blueBits = getFBConfigAttrib(fbconfigs[i], EGL_BLUE_SIZE);