Function glfwSetWindowAspectRatio

  • 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.

    Parameters

    • window: GLFWwindow

      The window to set limits for.

    • numer: number

      The numerator of the desired aspect ratio, or GLFW_DONT_CARE.

    • denom: number

      The denominator of the desired aspect ratio, or GLFW_DONT_CARE.

    Returns void

Generated using TypeDoc