예제 #1
0
파일: sdl_image.go 프로젝트: flazz/go-sdl2
func LoadGIF_RW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadGIF_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}
예제 #2
0
파일: image.go 프로젝트: DeedleFake/sdl
func LoadGIF_RW(rw *sdl.RWops) (*sdl.Surface, error) {
	s := C.IMG_LoadGIF_RW(cRWops(rw))
	if s == nil {
		return nil, getError()
	}

	return (*sdl.Surface)(unsafe.Pointer(s)), nil
}
예제 #3
0
func LoadGIF_RW(src *sdl.RWops) *sdl.Surface {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return (*sdl.Surface)(unsafe.Pointer(C.IMG_LoadGIF_RW(_src)))
}