glfwSetWindowContentScaleCallback¶
This function sets the window content scale callback of the specified window, which is called when the content scale of the specified window changes.
This callback is provided for convenience. The equivalent functionality can be achieved by registering a window size callback and querying the content scale within that callback.
Example:
glfwSetWindowContentScaleCallback($window, function($xscale, $yscale) {
echo "Window content scale changed to: " . $xscale . "x" . $yscale .
PHP_EOL;
});
- arguments
-
\GLFWwindow
$window
The window whose callback to set.callable
$callback
- returns
-
void