func LoadTexture_RW(renderer *sdl.Renderer, src *sdl.RWops, freesrc int) (*sdl.Texture, error) { _renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer)) _src := (*C.SDL_RWops)(unsafe.Pointer(src)) _freesrc := (C.int)(freesrc) _surface := C.IMG_LoadTexture_RW(_renderer, _src, _freesrc) if _surface == nil { return nil, GetError() } return (*sdl.Texture)(unsafe.Pointer(_surface)), nil }
func LoadTexture_RW(r *sdl.Renderer, rw *sdl.RWops, freesrc bool) (*sdl.Texture, error) { cfreesrc := C.int(0) if freesrc { cfreesrc = 1 } s := C.IMG_LoadTexture_RW(cRenderer(r), cRWops(rw), cfreesrc) if s == nil { return nil, getError() } return goTexture(s), nil }
func LoadTexture_RW(renderer *sdl.Renderer, src *sdl.RWops, freesrc int) *sdl.Texture { _renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer)) _src := (*C.SDL_RWops)(unsafe.Pointer(src)) _freesrc := (C.int)(freesrc) return (*sdl.Texture)(unsafe.Pointer(C.IMG_LoadTexture_RW(_renderer, _src, _freesrc))) }