glfwGetMonitors

Returns the currently connected monitors.

This function returns an array of handles for all currently connected monitors. The primary monitor is always first in the returned array. If no monitors were found, this function returns null.

extern (C) @nogc nothrow __gshared
glfwGetMonitors
(
int* count
)

Parameters

count int*

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

Return Value

Type: GLFWmonitor**

An array of monitor handles, or null if no monitors were found or if an error occurred.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED.

Pointer lifetime

The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the monitor configuration changes or the library is terminated.

Thread Safety

This function must only be called from the main thread.

@sa @ref monitor_monitors @sa @ref monitor_event @sa @ref glfwGetPrimaryMonitor

Meta

Since

Added in version 3.0.

Ingroup: monitor