示例#1
0
文件: render.go 项目: emlai/go-sdl2
// 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
}
示例#2
0
文件: render.go 项目: willemvds/sdl
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
}
示例#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))
}
示例#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
}
示例#5
0
func (texture *Texture) GetBlendMode() (bm BlendMode, status int) {
	status = int(C.SDL_GetTextureBlendMode(texture.cptr(), bm.cptr()))
	return
}