glfwSetFramebufferSizeCallback function

GLFWframebuffersizefun glfwSetFramebufferSizeCallback(
  1. Pointer<GLFWwindow> window,
  2. GLFWframebuffersizefun callback
)

! @brief Sets the framebuffer resize callback for the specified window.

This function sets the framebuffer resize callback of the specified window, which is called when the framebuffer of the specified window is resized.

@paramin window The window whose callback to set. @paramin callback The new callback, or NULL to remove the currently set callback. @return The previously set callback, or NULL if no callback was set or the library had not been initialized(@ref intro_init).

@callback_signature @code void function_name(GLFWwindow* window, int width, int height) @endcode For more information about the callback parameters, see the function pointer type(@ref GLFWframebuffersizefun).

@errors Possible errors include @ref GLFW_NOT_INITIALIZED.

@thread_safety This function must only be called from the main thread.

@sa @ref window_fbsize

@since Added in version 3.0.

@ingroup window

GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow* window, GLFWframebuffersizefun callback)

Implementation

GLFWframebuffersizefun glfwSetFramebufferSizeCallback(
    Pointer<GLFWwindow> window, GLFWframebuffersizefun callback) {
  final glfwSetFramebufferSizeCallbackLookupFunction = libglfw.lookupFunction<
      GLFWframebuffersizefun Function(
          Pointer<GLFWwindow> window, GLFWframebuffersizefun callback),
      GLFWframebuffersizefun Function(Pointer<GLFWwindow> window,
          GLFWframebuffersizefun callback)>('glfwSetFramebufferSizeCallback');
  return glfwSetFramebufferSizeCallbackLookupFunction(window, callback);
}