glfwDestroyWindow

Destroys the specified window and its context.

This function destroys the specified window and its context. On calling this function, no further callbacks will be called for that window.

If the context of the specified window is current on the main thread, it is detached before being destroyed.

extern (C) @nogc nothrow __gshared
void
glfwDestroyWindow

Parameters

window GLFWwindow*

The window to destroy.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.

@note The context of the specified window must not be current on any other thread when this function is called.

@reentrancy This function must not be called from a callback.

Thread Safety

This function must only be called from the main thread.

@sa @ref window_creation @sa @ref glfwCreateWindow

Meta

Since

Added in version 3.0. Replaces glfwCloseWindow.

Ingroup: window