mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
parent
12d49eaf6c
commit
276b1bc07a
@ -96,6 +96,8 @@ used by the tests and examples and are not required to build the library.
|
||||
- [GLX] Bugfix: NetBSD does not provide `libGL.so.1`
|
||||
- [EGL] Added `_GLFW_USE_EGLPLATFORM_H` configuration macro for controlling
|
||||
whether to use an existing `EGL/eglplatform.h` header
|
||||
- [EGL] Added and documented test for if the context is current on the calling
|
||||
thread during buffer swap
|
||||
- [EGL] Removed dependency on external EGL headers
|
||||
|
||||
|
||||
|
@ -3429,6 +3429,9 @@ GLFWAPI GLFWwindow* glfwGetCurrentContext(void);
|
||||
*
|
||||
* @param[in] window The window whose buffers to swap.
|
||||
*
|
||||
* @remarks __EGL:__ The context of the specified window must be current on the
|
||||
* calling thread.
|
||||
*
|
||||
* @par Thread Safety
|
||||
* This function may be called from any thread.
|
||||
*
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user