DarkBASIC Professional Help File

DX11 SET DISPLAY MODE

Allows changing display modes at runtime.
The provided width and height parameters must correspond to a combination that the active monitor supports.
This can be validated by going over all available display modes (DX11 GET DISPLAY MODE COUNT) and checking
if their width and height matches (using DX11 GET DISPLAY MODE WIDTH and DX11 GET DISPLAY MODE HEIGHT respectively).
Note that you can not use this function to set the display mode prior to calling DX11 INIT; use the width, height and fullscreen
parameters accepted by that one for the initial setting instead.
Also note that while this function will change the size of the render window as well, what it really changes is the display mode resolution.
This will change the screen resolution if setting the fullscreen flag to true. You can use DX11 SET WINDOW SIZE to resize the window (which
will stretch the graphics output from the active resolution to fit).
Furthermore, calling this function will reset the main camera's viewport to cover the entirety of the new back-/frontbuffer so if you have it manually
set to something else you may want to reset it using DX11 SET CAMERA VIEWPORT after calling this function.

Syntax

    DX11 SET DISPLAY MODE width, height, fullscreen

Parameters

    width

> Dword
> The width of the display mode to set, in pixels.

    height

> Dword
> The height of the display mode to set, in pixels.

    fullscreen

> Boolean
> If set to true, your program will go into fullscreen-exclusive mode. Set to false to use windowed mode instead.

Returns

This function does not return a value.

See also

DISPLAY Functions Menu
DX11 Function Categories