glfwGetVideoModes

Returns the available video modes for the specified monitor.

This function returns an array of all video modes supported by the specified monitor. The returned array is sorted in ascending order, first by color bit depth (the sum of all channel depths) and then by resolution area (the product of width and height).

extern (C) @nogc nothrow __gshared
const(GLFWvidmode)*
glfwGetVideoModes

Parameters

monitor GLFWmonitor*

The monitor to query.

count int*

Where to store the number of video modes in the returned array. This is set to zero if an error occurred.

Return Value

Type: const(GLFWvidmode)*

An array of video modes, or null if an error occurred.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.

Pointer lifetime

The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.

Thread Safety

This function must only be called from the main thread.

@sa @ref monitor_modes @sa @ref glfwGetVideoMode

Meta

Since

Added in version 1.0. @glfw3 Changed to return an array of modes for a specific monitor.

Ingroup: monitor