示例#1
0
func LoadWEBP_RW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadWEBP_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}
示例#2
0
文件: image.go 项目: DeedleFake/sdl
func LoadWEBP_RW(rw *sdl.RWops) (*sdl.Surface, error) {
	s := C.IMG_LoadWEBP_RW(cRWops(rw))
	if s == nil {
		return nil, getError()
	}

	return (*sdl.Surface)(unsafe.Pointer(s)), nil
}
示例#3
0
func LoadWEBP_RW(src *sdl.RWops) *sdl.Surface {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return (*sdl.Surface)(unsafe.Pointer(C.IMG_LoadWEBP_RW(_src)))
}