Exemplo n.º 1
0
// Texture (https://wiki.libsdl.org/SDL_GetTextureBlendMode)
func (texture *Texture) GetBlendMode() (bm BlendMode, err error) {
	_ret := C.SDL_GetTextureBlendMode(texture.cptr(), bm.cptr())
	if _ret < 0 {
		err = GetError()
		return bm, err
	}
	return bm, nil
}
Exemplo n.º 2
0
func (t *Texture) GetBlendMode() (BlendMode, error) {
	var mode C.SDL_BlendMode
	if C.SDL_GetTextureBlendMode(t.c, &mode) != 0 {
		return 0, getError()
	}

	return BlendMode(mode), nil
}
Exemplo n.º 3
0
func (texture *Texture) GetBlendMode(blendMode *uint32) int {
	_texture := (*C.SDL_Texture)(unsafe.Pointer(texture))
	_blendMode := (*C.SDL_BlendMode)(unsafe.Pointer(blendMode))
	return (int)(C.SDL_GetTextureBlendMode(_texture, _blendMode))
}
Exemplo n.º 4
0
func (texture *Texture) GetBlendMode() (blendMode uint32, status int) {
	_texture := (*C.SDL_Texture)(unsafe.Pointer(texture))
	_blendMode := (*C.SDL_BlendMode)(unsafe.Pointer(&blendMode))
	status = (int)(C.SDL_GetTextureBlendMode(_texture, _blendMode))
	return
}
Exemplo n.º 5
0
func (texture *Texture) GetBlendMode() (bm BlendMode, status int) {
	status = int(C.SDL_GetTextureBlendMode(texture.cptr(), bm.cptr()))
	return
}