mirror of
https://github.com/glfw/glfw.git
synced 2024-11-15 02:34:36 +00:00
glfwMakeUserContextCurrent now calls glfwMakeContextCurrent(NULL) to ensure TLS set.
This commit is contained in:
parent
f2b86a25b3
commit
4caca8b20c
@ -778,6 +778,9 @@ GLFWAPI void glfwDestroyUserContext(GLFWusercontext* handle)
|
||||
GLFWAPI void glfwMakeUserContextCurrent(GLFWusercontext* handle)
|
||||
{
|
||||
_GLFWusercontext* context = (_GLFWusercontext*)handle;
|
||||
|
||||
glfwMakeContextCurrent(NULL);
|
||||
|
||||
if (context)
|
||||
context->makeCurrent(context);
|
||||
}
|
||||
|
@ -31,11 +31,9 @@ int main(void)
|
||||
}
|
||||
|
||||
/* set the user context current */
|
||||
glfwMakeContextCurrent(NULL);
|
||||
glfwMakeUserContextCurrent(usercontext);
|
||||
|
||||
/* set the window context current */
|
||||
glfwMakeUserContextCurrent(NULL);
|
||||
glfwMakeContextCurrent(window);
|
||||
|
||||
glClearColor( 0.4f, 0.3f, 0.4f, 0.0f );
|
||||
|
Loading…
Reference in New Issue
Block a user