GLFW
3.0.2
A multi-platform library for OpenGL, window and input
|
The GLFWmonitor object represents a currently connected monitor.
The primary monitor is returned by glfwGetPrimaryMonitor. It is usually the user's preferred monitor and the one with global UI elements like task bar or menu bar.
You can retrieve all currently connected monitors with glfwGetMonitors.
Although GLFW generally does a good job at selecting a suitable video mode for you when you open a full screen window, it is sometimes useful to know exactly which modes are available on a certain system. For example, you may want to present the user with a list of video modes to select from. To get a list of available video modes, you can use the function glfwGetVideoModes.
To get the current video mode of a monitor call glfwGetVideoMode.
The physical size in millimetres of a monitor, or an approximation of it, can be retrieved with glfwGetMonitorPhysicalSize.
This can, for example, be used together with the current video mode to calculate the DPI of a monitor.
The name of a monitor is returned by glfwGetMonitorName.
The monitor name is a regular C string using the UTF-8 encoding. Note that monitor names are not guaranteed to be unique.
The gamma ramp of a monitor can be set with glfwSetGammaRamp, which accepts a monitor handle and a pointer to a GLFWgammaramp structure.
The current gamma ramp for a monitor is returned by glfwGetGammaRamp.
If you wish to set a regular gamma ramp, you can have GLFW calculate it for you from the desired exponent with glfwSetGamma, which in turn calls glfwSetGammaRamp with the resulting ramp.