Пример #1
0
func GetRenderDriverInfo(i int) (*RendererInfo, error) {
	var r RendererInfo
	if C.SDL_GetRenderDriverInfo(C.int(i), r.c()) != 0 {
		return nil, getError()
	}

	return &r, nil
}
Пример #2
0
// GetRenderDriverInfo (https://wiki.libsdl.org/SDL_GetRenderDriverInfo)
func GetRenderDriverInfo(index int, info *RendererInfo) int {
	var cinfo cRendererInfo
	ret := int(C.SDL_GetRenderDriverInfo(C.int(index), cinfo.cptr()))

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

	return ret
}
Пример #3
0
func GetRenderDriverInfo(_index int) *RendererInfo {
	var rendererInfo *RendererInfo = &RendererInfo{}
	C.SDL_GetRenderDriverInfo(C.int(_index), (*C.SDL_RendererInfo)(cast(rendererInfo)))
	return rendererInfo
}
Пример #4
0
func GetRenderDriverInfo(index int, info *RendererInfo) int {
	_index := (C.int)(index)
	_info := (*C.SDL_RendererInfo)(unsafe.Pointer(info))
	return (int)(C.SDL_GetRenderDriverInfo(_index, _info))
}