Sets the mode, monitor, video mode and placement of a window.
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
If you only wish to update the resolution of a full screen window or the
size of a windowed mode window, see
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.
$windowThe window whose monitor, size or video mode to set.
$monitorThe desired monitor, or
NULLto set windowed mode.
$xposThe desired x-coordinate of the upper-left corner of the content area.
$yposThe desired y-coordinate of the upper-left corner of the content area.
$widthThe desired with, in screen coordinates, of the content area or video mode.
$heightThe desired height, in screen coordinates, of the content area or video mode.
$refreshRateThe desired refresh rate, in Hz, of the video mode, or