示例#1
0
func (renderer *Renderer) GetRendererOutputSize() (w, h int, status int) {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_w := (*C.int)(unsafe.Pointer(&w))
	_h := (*C.int)(unsafe.Pointer(&h))
	status = (int)(C.SDL_GetRendererOutputSize(_renderer, _w, _h))
	return
}
示例#2
0
文件: render.go 项目: emlai/go-sdl2
// Renderer (https://wiki.libsdl.org/SDL_GetRendererOutputSize)
func (renderer *Renderer) GetRendererOutputSize() (w, h int, err error) {
	_w := (*C.int)(unsafe.Pointer(&w))
	_h := (*C.int)(unsafe.Pointer(&h))
	_ret := C.SDL_GetRendererOutputSize(renderer.cptr(), _w, _h)
	if _ret < 0 {
		err = GetError()
	}
	return
}
示例#3
0
func (renderer *Renderer) GetRendererOutputSize(w *int, h *int) int {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_w := (*C.int)(unsafe.Pointer(w))
	_h := (*C.int)(unsafe.Pointer(h))
	return (int)(C.SDL_GetRendererOutputSize(_renderer, _w, _h))
}
示例#4
0
func (renderer *Renderer) GetRendererOutputSize() (w, h int, status int) {
	_w := (*C.int)(unsafe.Pointer(&w))
	_h := (*C.int)(unsafe.Pointer(&h))
	status = int(C.SDL_GetRendererOutputSize(renderer.cptr(), _w, _h))
	return
}