glfwSetWindowMonitor¶
Sets the mode, monitor, video mode and placement of a window.
function glfwSetWindowMonitor(\GLFWwindow $window, ?\GLFWmonitor $monitor, int $xpos, int $ypos, int $width, int $height, int $refreshRate) : void
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.
- arguments
-
\GLFWwindow$windowThe window whose monitor, size or video mode to set.?\GLFWmonitor$monitorThe desired monitor, orNULLto set windowed mode.int$xposThe desired x-coordinate of the upper-left corner of the content area.int$yposThe desired y-coordinate of the upper-left corner of the content area.int$widthThe desired with, in screen coordinates, of the content area or video mode.int$heightThe desired height, in screen coordinates, of the content area or video mode.int$refreshRateThe desired refresh rate, in Hz, of the video mode, orGLFW_DONT_CARE.
- returns
-
void