Add check for EGL specific buffer swap issue

Fixes #675.
This commit is contained in:
Camilla Berglund
2016-01-31 19:17:18 +01:00
parent 12d49eaf6c
commit 276b1bc07a
3 changed files with 12 additions and 0 deletions
+7
View File
@@ -584,6 +584,13 @@ void _glfwPlatformMakeContextCurrent(_GLFWwindow* window)
void _glfwPlatformSwapBuffers(_GLFWwindow* window)
{
if (window != _glfwPlatformGetCurrentContext())
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"EGL: The context must be current on the calling thread when swapping buffers");
return;
}
eglSwapBuffers(_glfw.egl.display, window->context.egl.surface);
}