Tao.Sdl SDK Documentation

Sdl.SDL_SetGamma Method 

Set the gamma correction for each of the color channels.

[Visual Basic]
Public Shared Function SDL_SetGamma( _
   ByVal red As Single, _
   ByVal green As Single, _
   ByVal blue As Single _
) As Integer
[C#]
public static int SDL_SetGamma(
   float red,
   float green,
   float blue
);

Parameters

red
green
blue

Return Value

If successful, this function returns 0, otherwise it returns -1.

Remarks

Sets the "gamma function" 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 function" parameter, you can directly specify lookup tables for gamma adjustment with SDL_SetGammaRamp.

Not all display hardware is able to change gamma.

The gamma values range (approximately) between 0.1 and 10.0.

If this function isn't supported directly by the hardware, it will be emulated using gamma ramps, if available. If successful, this function returns 0, otherwise it returns -1.

Binds to C-function call in SDL_video.h:

extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue)

See Also

Sdl Class | Tao.Sdl Namespace | SDL_GetGammaRamp | SDL_SetGammaRamp