Commit d8a1de0e authored by Doug Binks's avatar Doug Binks Committed by Degrande Samuel
Browse files

Added glfwGetCurrentUserContext

parent 1f752fb1
......@@ -5647,6 +5647,12 @@ GLFWAPI void glfwDestroyUserContext(GLFWusercontext* context);
*/
GLFWAPI void glfwMakeUserContextCurrent(GLFWusercontext* context);
/*! @brief Get the current OpenGL user context
*
*/
GLFWAPI GLFWusercontext* glfwGetCurrentUserContext(void);
/*! @brief Returns whether the Vulkan loader and an ICD have been found.
*
* This function returns whether the Vulkan loader and any minimally functional
......
......@@ -802,3 +802,9 @@ GLFWAPI void glfwMakeUserContextCurrent(GLFWusercontext* handle)
if (context)
context->makeCurrent(context);
}
GLFWAPI GLFWusercontext* glfwGetCurrentUserContext(void)
{
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
return _glfwPlatformGetTls(&_glfw.usercontextSlot);
}
\ No newline at end of file
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