glfwSetFramebufferSizeCallback¶
This function sets the framebuffer resize callback of the specified window, which is called when the framebuffer of the specified window is resized.
This callback is provided for convenience. The equivalent functionality can be achieved by registering a window size callback and querying the framebuffer size within that callback.
Example:
glfwSetFramebufferSizeCallback($window, function($width, $height) {
echo "Framebuffer size changed to: " . $width . "x" . $height . PHP_EOL;
});
- arguments
-
\GLFWwindow
$window
The window whose callback to set.callable
$callback
- returns
-
void