Example #1
0
func (r *Renderer) GetInfo() (*RendererInfo, error) {
	var ri RendererInfo
	if C.SDL_GetRendererInfo(r.c, ri.c()) != 0 {
		return nil, getError()
	}

	return &ri, nil
}
Example #2
0
func (renderer *Renderer) GetRendererInfo(info *RendererInfo) int {
	var cinfo cRendererInfo
	ret := int(C.SDL_GetRendererInfo(renderer.cptr(), cinfo.cptr()))

	info.RendererInfoData = cinfo.RendererInfoData
	// No need to free, it's done by DestroyRenderer
	info.Name = C.GoString(cinfo.Name)

	return ret
}
Example #3
0
func (renderer *Renderer) GetRendererInfo(info *RendererInfo) int {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_info := (*C.SDL_RendererInfo)(unsafe.Pointer(info))
	return (int)(C.SDL_GetRendererInfo(_renderer, _info))
}