lovr.graphics.createWindow

Create the desktop window, usually used to mirror the headset display.

lovr.graphics.createWindow(flags)

Arguments

NameTypeDescription
flagstableFlags to customize the window's appearance and behavior.
.widthnumberThe width of the window, or 0 to use the size of the monitor.
.heightnumberThe height of the window, or 0 to use the size of the monitor.
.fullscreenbooleanWhether the window should be fullscreen.
.resizablebooleanWhether the window should be resizable.
.msaanumberThe number of samples to use for multisample antialiasing.
.titlestringThe window title.
.iconstringA path to an image to use for the window icon.
.vsyncnumber0 to disable vsync, 1 to enable. This is only a hint, and may not be respected if necessary for the current VR display.

Returns

Nothing

Notes

This function can only be called once. It is normally called internally, but you can override this by setting window to nil in conf.lua. See lovr.conf for more information.

The window must be created before any lovr.graphics functions can be used.

See also