Exemple #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
}
Exemple #2
0
func (r *Renderer) SetRenderTarget(t *Texture) error {
	if C.SDL_SetRenderTarget(r.c, t.c) != 0 {
		return getError()
	}

	return nil
}
Exemple #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))
}
Exemple #4
0
func (renderer *Renderer) SetRenderTarget(texture *Texture) int {
	return int(C.SDL_SetRenderTarget(renderer.cptr(), texture.cptr()))
}