Use EGL_KHR_create_context with GLES as well.

This commit is contained in:
Camilla Berglund 2012-07-22 02:00:00 +02:00
parent bddc95c017
commit ccca5d71fe

View File

@ -252,17 +252,13 @@ static int createContext(_GLFWwindow* window,
return GL_FALSE;
}
index = 0;
if (wndconfig->clientAPI == GLFW_OPENGL_ES_API)
{
eglBindAPI(EGL_OPENGL_ES_API);
setEGLattrib(attribs, index, EGL_CONTEXT_CLIENT_VERSION, wndconfig->glMajor);
}
else
{
eglBindAPI(EGL_OPENGL_API);
index = 0;
if (_glfwLibrary.EGL.KHR_create_context)
{
setEGLattrib(attribs, index, EGL_CONTEXT_MAJOR_VERSION_KHR, wndconfig->glMajor);
@ -308,6 +304,10 @@ static int createContext(_GLFWwindow* window,
setEGLattrib(attribs, index, EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR, strategy);
}
}
else
{
if (wndconfig->clientAPI == GLFW_OPENGL_ES_API)
setEGLattrib(attribs, index, EGL_CONTEXT_CLIENT_VERSION, wndconfig->glMajor);
}
setEGLattrib(attribs, index, EGL_NONE, EGL_NONE);