Dgame.Window.DisplayMode

« Go back

Bottom


struct DisplayMode;
The DisplayMode struct contains informations about the current window video mode. It is passed to Window which extract the informations and use them to build a window context.

Author:
Randy Schuett (rswhite4@googlemail.com)

uint width;
The width of this video mode

uint height;
The height of this video mode

ubyte refreshRate;
The refresh rate of this video mode

pure nothrow @nogc this(uint width, uint height, ubyte hz = 60);
CTor

const pure nothrow @nogc bool opEquals(ref const DisplayMode dm);
opEquals

static nothrow @nogc DisplayMode getDesktopMode(ubyte display = 0);
Returns the desktop video mode at the given display

Note:
There's a difference between this and getMode when your application runs in fullscreen and has changed the resolution. In that case this function will return the previous native display mode, and not the current display mode.

static nothrow @nogc DisplayMode getMode(uint index, ubyte display = 0);
Returns the video mode at the given index and display

static nothrow @nogc DisplayMode getCurrentMode(ubyte display = 0);
Returns the current video mode at the given display

static nothrow DisplayMode[] listModes(ubyte display = 0);
Returns a List of all valid supported video modes at the given display

static nothrow @nogc Rect getDisplayBounds(ubyte display = 0);
Returns the desktop area represented by the given display, with the primary display located at 0|0.

static nothrow @nogc string getDisplayName(ubyte display = 0);
Returns the name of the given display

static nothrow @nogc int getNumOfModes(ubyte display = 0);
Returns how many valid display modes are supported at the given display

static nothrow @nogc int getNumOfDisplays();
Returns how many display are available.

static nothrow @nogc int getNumOfVideoDrivers();
Returns how many video drivers are available.

static nothrow @nogc string getCurrentVideoDriver();
Returns the name of the current video driver.


Page generated by Ddoc.

» Dgame.Window.DisplayMode on Github

Top

« Go back