Ejemplo n.º 1
0
// Renderer (https://wiki.libsdl.org/SDL_RenderSetViewport)
func (renderer *Renderer) SetViewport(rect *Rect) error {
	_ret := C.SDL_RenderSetViewport(renderer.cptr(), rect.cptr())
	if _ret < 0 {
		return GetError()
	}
	return nil
}
Ejemplo n.º 2
0
func (r *Renderer) SetViewport(rect *Rect) error {
	if C.SDL_RenderSetViewport(r.c, rect.c()) != 0 {
		return getError()
	}

	return nil
}
Ejemplo n.º 3
0
func (renderer *Renderer) SetViewport(rect *Rect) int {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_rect := (*C.SDL_Rect)(unsafe.Pointer(rect))
	return (int)(C.SDL_RenderSetViewport(_renderer, _rect))
}
Ejemplo n.º 4
0
func (renderer *Renderer) SetViewport(rect *Rect) int {
	return int(C.SDL_RenderSetViewport(renderer.cptr(), rect.cptr()))
}