glfwSetWindowUserPointer

Sets the user pointer of the specified window.

This function sets the user-defined pointer of the specified window. The current value is retained until the window is destroyed. The initial value is null.

extern (C) @nogc nothrow __gshared
void
glfwSetWindowUserPointer

Parameters

window GLFWwindow*

The window whose pointer to set.

pointer void*

The new value.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED.

Thread Safety

This function may be called from any thread. Access is not synchronized.

@sa @ref window_userptr @sa @ref glfwGetWindowUserPointer

Meta

Since

Added in version 3.0.

Ingroup: window