glfwGetCurrentContext function

Pointer<GLFWwindow> glfwGetCurrentContext()

! @brief Returns the window whose context is current on the calling thread.

This function returns the window whose OpenGL or OpenGL ES context is current on the calling thread.

@return The window whose context is current, or NULL if no window's context is current.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED.

@thread_safety This function may be called from any thread.

@sa @ref context_current @sa @ref glfwMakeContextCurrent

@since Added in version 3.0.

@ingroup context

GLFWAPI GLFWwindow* glfwGetCurrentContext(void)

Implementation

Pointer<GLFWwindow> glfwGetCurrentContext() {
  final glfwGetCurrentContextLookupFunction = libglfw.lookupFunction<
      Pointer<GLFWwindow> Function(),
      Pointer<GLFWwindow> Function()>('glfwGetCurrentContext');
  return glfwGetCurrentContextLookupFunction();
}