Use EGL_KHR_create_context with GLES as well.

master
Camilla Berglund ago%!(EXTRA string=13 years)
parent bddc95c017
commit ccca5d71fe
  1. 12
      src/x11_egl_opengl.c

@ -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);

Loading…
Cancel
Save