Syntax

dbSetDisplayMode(Width, Height, Depth [, VSync [, MultiSampling, MultiMonitor]])

Description

This command will set the screen display mode if it is available on the current graphics card. This command will not cause your program to fail on machines that do not support the resolution. It is recommended, however, that you check the availability of the display mode before using this command. You can use dbCheckDisplayMode to see whether the display mode is supported.

 

When this command is called everything in video memory is deleted including music and sound so you must reload all of your assets after a call it. An additional property to force vertical synchronization (VSync) on or off. This command is more reliable than dbSyncRate in creating a perfect sync between the render and the monitor. The downside is that the VSync is fixed to the refresh of the monitor. Be aware that if the rendering area is stretched (usually via window desktop and window full-screen modes), then it will not be a true framerate returned by dbScreenFPS. This command does not support an 8-bit screen depth.

 

VSync

Setting VSync to a value of 1 will force the screen to use vertical sync and synchronize to the monitors refresh rate.

 

MultiSampling

Set Multisampling Factor to map direct to the D3DMULTISAMPLE_TYPE format in DirectX, ideal for setting multi-sampling screens for anit-aliasing.

 

MultiMonitor

Set MultiMonitor to a in order to double the width of the resolution, allowing a fullscreen application to expand to a second monitor or for some stereoscopic uses