Example #1
0
func SetGamma(red, green, blue float32) error {
	c_red := C.float(red)
	c_green := C.float(green)
	c_blue := C.float(blue)
	ret := C.SDL_SetGamma(c_red, c_green, c_blue)
	if ret == 0 {
		return nil
	}
	return GetError()
}
Example #2
0
// Set the gamma correction for each of the color channels.
// 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.
func SetGamma(red, green, blue float) int {
	return int(C.SDL_SetGamma(C.float(red), C.float(green), C.float(blue)))
}