Function sdl2_sys::SDL_SetWindowGammaRamp
source · pub unsafe extern "C" fn SDL_SetWindowGammaRamp(
window: *mut SDL_Window,
red: *const Uint16,
green: *const Uint16,
blue: *const Uint16,
) -> c_int
Expand description
Set the gamma ramp for the display that owns a given window.
Set the gamma translation table for the red, green, and blue channels of the video hardware. Each table is an array of 256 16-bit quantities, representing a mapping between the input and output for that channel. The input is the index into the array, and the output is the 16-bit gamma value at that index, scaled to the output color precision.
Despite the name and signature, this method sets the gamma ramp of the entire display, not an individual window. A window is considered to be owned by the display that contains the window’s center pixel. (The index of this display can be retrieved using SDL_GetWindowDisplayIndex().) The gamma ramp set will not follow the window if it is moved to another display.
\param window the window used to select the display whose gamma ramp will be changed \param red a 256 element array of 16-bit quantities representing the translation table for the red channel, or NULL \param green a 256 element array of 16-bit quantities representing the translation table for the green channel, or NULL \param blue a 256 element array of 16-bit quantities representing the translation table for the blue channel, or NULL \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
\since This function is available since SDL 2.0.0.
\sa SDL_GetWindowGammaRamp