Exemple #1
0
func (texture *Texture) SetColorMod(r uint8, g uint8, b uint8) int {
	_texture := (*C.SDL_Texture)(unsafe.Pointer(texture))
	_r := (C.Uint8)(r)
	_g := (C.Uint8)(g)
	_b := (C.Uint8)(b)
	return (int)(C.SDL_SetTextureColorMod(_texture, _r, _g, _b))
}
Exemple #2
0
func (t *Texture) SetColorMod(r, g, b uint8) error {
	if C.SDL_SetTextureColorMod(t.c, C.Uint8(r), C.Uint8(g), C.Uint8(b)) != 0 {
		return getError()
	}

	return nil
}
Exemple #3
0
// Texture (https://wiki.libsdl.org/SDL_SetTextureColorMod)
func (texture *Texture) SetColorMod(r uint8, g uint8, b uint8) error {
	_r := C.Uint8(r)
	_g := C.Uint8(g)
	_b := C.Uint8(b)
	_ret := C.SDL_SetTextureColorMod(texture.cptr(), _r, _g, _b)
	if _ret < 0 {
		return GetError()
	}
	return nil
}
func (t *Texture) SetColorMod(_red uint8, _green uint8, _blue uint8) {
	C.SDL_SetTextureColorMod(t.Get(), C.Uint8(_red), C.Uint8(_green), C.Uint8(_blue))
}
Exemple #5
0
func (t *Texture) SetColorMod(r, g, b uint8) bool {
	ret := C.SDL_SetTextureColorMod(t.cTexture, C.Uint8(r), C.Uint8(g), C.Uint8(b))
	return int(ret) == 0
}
Exemple #6
0
func (texture *Texture) SetColorMod(r uint8, g uint8, b uint8) int {
	_r := C.Uint8(r)
	_g := C.Uint8(g)
	_b := C.Uint8(b)
	return int(C.SDL_SetTextureColorMod(texture.cptr(), _r, _g, _b))
}