Esempio n. 1
0
// Window (https://wiki.libsdl.org/SDL_GetRenderer)
func (window *Window) GetRenderer() (*Renderer, error) {
	_renderer := C.SDL_GetRenderer(window.cptr())
	if _renderer == nil {
		return nil, GetError()
	}
	return (*Renderer)(unsafe.Pointer(_renderer)), nil
}
Esempio n. 2
0
func (w *Window) GetRenderer() (*Renderer, error) {
	r := C.SDL_GetRenderer(w.c)
	if r == nil {
		return nil, getError()
	}

	return &Renderer{r}, nil
}
Esempio n. 3
0
func (window *Window) GetRenderer() *Renderer {
	_window := (*C.SDL_Window)(unsafe.Pointer(window))
	return (*Renderer)(unsafe.Pointer(C.SDL_GetRenderer(_window)))
}
Esempio n. 4
0
func (window *Window) GetRenderer() *Renderer {
	return (*Renderer)(unsafe.Pointer(C.SDL_GetRenderer(window.cptr())))
}