Tao.Glfw SDK Documentation

Glfw.glfwSetWindowCloseCallback Method 

Selects which function to be called upon a window close event.

[Visual Basic]
Public Shared Sub glfwSetWindowCloseCallback( _
   ByVal cbfun As GLFWwindowclosefun _
)
[C#]
public static void glfwSetWindowCloseCallback(
   GLFWwindowclosefun cbfun
);

Parameters

cbfun
Pointer to a callback function that will be called when a user requests that the window should be closed.

Remarks

A window has to be opened for this function to have any effect.

Window close events are recorded continuously, but only reported when glfwPollEvents, glfwWaitEvents or glfwSwapBuffers is called.

The OpenGLTM context is still valid when this function is called.

Note that the window close callback function is not called when glfwCloseWindow is called, but only when the close request comes from the window manager.

Do not call glfwCloseWindow from a window close callback function. Close the window by returning GL_TRUE from the function.

See Also

Glfw Class | Tao.Glfw Namespace