예제 #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
파일: render.go 프로젝트: JalfResi/go-sdl2
func (texture *Texture) GetBlendMode() (bm BlendMode, status int) {
	status = int(C.SDL_GetTextureBlendMode(texture.cptr(), bm.cptr()))
	return
}