Esempio n. 1
0
// Renderer (https://wiki.libsdl.org/SDL_SetRenderTarget)
func (renderer *Renderer) SetRenderTarget(texture *Texture) error {
	_ret := C.SDL_SetRenderTarget(renderer.cptr(), texture.cptr())
	if _ret < 0 {
		return GetError()
	}
	return nil
}
Esempio n. 2
0
func (r *Renderer) SetRenderTarget(t *Texture) error {
	if C.SDL_SetRenderTarget(r.c, t.c) != 0 {
		return getError()
	}

	return nil
}
Esempio n. 3
0
func (renderer *Renderer) SetRenderTarget(texture *Texture) int {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_texture := (*C.SDL_Texture)(unsafe.Pointer(texture))
	return (int)(C.SDL_SetRenderTarget(_renderer, _texture))
}
Esempio n. 4
0
func (renderer *Renderer) SetRenderTarget(texture *Texture) int {
	return int(C.SDL_SetRenderTarget(renderer.cptr(), texture.cptr()))
}