glfwSetWindowAspectRatio¶
Sets the aspect ratio of the specified window.
This function sets the required aspect ratio of the content area of the specified window. If the window is full screen, the aspect ratio only takes effect once it is made windowed. If the window is not resizable, this function does nothing.
The aspect ratio is specified as a numerator and a denominator and both values must be greater than zero. For example, the common 16:9 aspect ratio is specified as 16 and 9, respectively.
If the numerator and denominator is set to GLFW_DONT_CARE
then the aspect
ratio limit is disabled.
The aspect ratio is applied immediately to a windowed mode window and may cause it to be resized.
- arguments
-
\GLFWwindow
$window
The window to set limits for.int
$numer
The numerator of the desired aspect ratio, orGLFW_DONT_CARE
.int
$denom
The denominator of the desired aspect ratio, orGLFW_DONT_CARE
.
- returns
-
void