SDL_SetGamma
Use this function to set the gamma correction for each of the color channels on the currently selected display.
Syntax
int SDL_SetGamma(float red,
float green,
float blue)
Function Parameters
red |
the gamma correction for the red color channel |
green |
the gamma correction for the green color channel |
blue |
the gamma correction for the blue color channel |
Return Value
Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
Code Examples
You can add your code example here
Remarks
Sets the gamma adjustment for the display of each color component. Gamma controls the brightness/contrast of colors displayed on the screen. A gamma value of 1.0 is identity (i.e., no adjustment is made).
This function adjusts the gamma based on the gamma adjustment parameter. You can directly specify lookup tables for gamma adjustment with SDL_SetGammaRamp().
Warning: Under Linux, gamma settings affect the entire display (including the desktop)!
Not all display hardware is able to change gamma; it will return -1 if gamma is unsupported.