Function glfwSetWindowMonitor

  • This function sets the monitor that the window uses for full screen mode or, if the monitor is NULL, makes it windowed mode.

    When setting a monitor, this function updates the width, height and refresh rate of the desired video mode and switches to the video mode closest to it. The window position is ignored when setting a monitor.

    When the monitor is NULL, the position, width and height are used to place the window content area. The refresh rate is ignored when no monitor is specified.

    If you only wish to update the resolution of a full screen window or the size of a windowed mode window, see glfwSetWindowSize.

    When a window transitions from full screen to windowed mode, this function restores any previous window settings such as whether it is decorated, floating, resizable, has size or aspect ratio limits, etc.

    Parameters

    • window: GLFWwindow

      The window whose monitor, size or video mode to set.

    • monitor: GLFWmonitor

      The desired monitor, or NULL to set windowed mode.

    • xpos: number

      The desired x-coordinate of the upper-left corner of the content area

    • ypos: number

      The desired y-coordinate of the upper-left corner of the content area.

    • width: number

      The desired with, in screen coordinates, of the content area or video mode.

    • height: number

      The desired height, in screen coordinates, of the content area or video mode.

    • refreshRate: number

      The desired refresh rate, in Hz, of the video mode, or GLFW_DONT_CARE.

    Returns void

Generated using TypeDoc