Commit c8ef1223 authored by Doug Binks's avatar Doug Binks Committed by Degrande Samuel

glfwMakeUserContextCurrent now calls glfwMakeContextCurrent(NULL) to ensure TLS set.

parent 5df8603c
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment