mirror of
https://github.com/glfw/glfw.git
synced 2024-11-23 02:25:10 +00:00
Use EGL_KHR_create_context with GLES as well.
This commit is contained in:
parent
bddc95c017
commit
ccca5d71fe
@ -252,17 +252,13 @@ static int createContext(_GLFWwindow* window,
|
|||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
index = 0;
|
|
||||||
|
|
||||||
if (wndconfig->clientAPI == GLFW_OPENGL_ES_API)
|
if (wndconfig->clientAPI == GLFW_OPENGL_ES_API)
|
||||||
{
|
|
||||||
eglBindAPI(EGL_OPENGL_ES_API);
|
eglBindAPI(EGL_OPENGL_ES_API);
|
||||||
setEGLattrib(attribs, index, EGL_CONTEXT_CLIENT_VERSION, wndconfig->glMajor);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
eglBindAPI(EGL_OPENGL_API);
|
eglBindAPI(EGL_OPENGL_API);
|
||||||
|
|
||||||
|
index = 0;
|
||||||
|
|
||||||
if (_glfwLibrary.EGL.KHR_create_context)
|
if (_glfwLibrary.EGL.KHR_create_context)
|
||||||
{
|
{
|
||||||
setEGLattrib(attribs, index, EGL_CONTEXT_MAJOR_VERSION_KHR, wndconfig->glMajor);
|
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);
|
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);
|
setEGLattrib(attribs, index, EGL_NONE, EGL_NONE);
|
||||||
|
Loading…
Reference in New Issue
Block a user