示例#1
0
func (window *Window) SetGammaRamp(red, green, blue *uint16) int {
	_window := (*C.SDL_Window)(unsafe.Pointer(window))
	_red := (*C.Uint16)(red)
	_green := (*C.Uint16)(red)
	_blue := (*C.Uint16)(blue)
	return (int)(C.SDL_SetWindowGammaRamp(_window, _red, _green, _blue))
}
示例#2
0
文件: video.go 项目: flazz/go-sdl2
// Window (https://wiki.libsdl.org/SDL_SetWindowGammaRamp)
func (window *Window) SetGammaRamp(red, green, blue *[256]uint16) error {
	if C.SDL_SetWindowGammaRamp(
		window.cptr(),
		(*C.Uint16)(unsafe.Pointer(red)),
		(*C.Uint16)(unsafe.Pointer(green)),
		(*C.Uint16)(unsafe.Pointer(blue))) != 0 {

		return GetError()
	}
	return nil
}
示例#3
0
文件: video.go 项目: DeedleFake/sdl
func (win *Window) SetGammaRamp(r, g, b uint16) error {
	cr := (*C.Uint16)(unsafe.Pointer(&r))
	cg := (*C.Uint16)(unsafe.Pointer(&g))
	cb := (*C.Uint16)(unsafe.Pointer(&b))

	if C.SDL_SetWindowGammaRamp(win.c, cr, cg, cb) != 0 {
		return getError()
	}

	return nil
}
示例#4
0
文件: video.go 项目: JalfResi/go-sdl2
func (window *Window) SetGammaRamp(red, green, blue *uint16) int {
	_red := (*C.Uint16)(red)
	_green := (*C.Uint16)(red)
	_blue := (*C.Uint16)(blue)
	return int(C.SDL_SetWindowGammaRamp(window.cptr(), _red, _green, _blue))
}