glfwSetGammaRamp

Sets the current gamma ramp for the specified monitor.

This function sets the current gamma ramp for the specified monitor. The original gamma ramp for that monitor is saved by GLFW the first time this function is called and is restored by @ref glfwTerminate.

The software controlled gamma ramp is applied _in addition_ to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.

For gamma correct rendering with OpenGL or OpenGL ES, see the @ref GLFW_SRGB_CAPABLE hint.

extern (C) @nogc nothrow __gshared
void
glfwSetGammaRamp

Parameters

monitor GLFWmonitor*

The monitor whose gamma ramp to set.

ramp const(GLFWgammaramp)*

The gamma ramp to use.

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

@remark The size of the specified gamma ramp should match the size of the current ramp for that monitor.

@remark @win32 The gamma ramp size must be 256.

@remark @wayland Gamma handling is a privileged protocol, this function will thus never be implemented and emits @ref GLFW_PLATFORM_ERROR.

Pointer lifetime

The specified gamma ramp is copied before this function returns.

Thread Safety

This function must only be called from the main thread.

@sa @ref monitor_gamma

Meta

Since

Added in version 3.0.

Ingroup: monitor