當前位置: 首頁>>代碼示例>>Golang>>正文


Golang C.SDL_VideoModeOK函數代碼示例

本文整理匯總了Golang中C.SDL_VideoModeOK函數的典型用法代碼示例。如果您正苦於以下問題:Golang SDL_VideoModeOK函數的具體用法?Golang SDL_VideoModeOK怎麽用?Golang SDL_VideoModeOK使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了SDL_VideoModeOK函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: VideoModeOK

func VideoModeOK(width, height, bitsPerPixel int, flags SurfaceFlags) int {
	c_width := C.int(width)
	c_height := C.int(height)
	c_bpp := C.int(bitsPerPixel)
	c_flags := C.Uint32(flags)
	ret := C.SDL_VideoModeOK(c_width, c_height, c_bpp, c_flags)
	return int(ret)
}
開發者ID:badgerodon,項目名稱:go,代碼行數:8,代碼來源:video.go

示例2: VideoModeOK

// Checks to see if a particular video mode is supported.  Returns 0 if not
// supported, or the bits-per-pixel of the closest available mode.
func VideoModeOK(width int, height int, bpp int, flags uint32) int {
	GlobalMutex.Lock()
	status := int(C.SDL_VideoModeOK(C.int(width), C.int(height), C.int(bpp), C.Uint32(flags)))
	GlobalMutex.Unlock()
	return status
}
開發者ID:kearsley,項目名稱:Go-SDL,代碼行數:8,代碼來源:sdl.go

示例3: VideoModeOK

// Checks to see if a particular video mode is supported.  Returns 0 if not
// supported, or the bits-per-pixel of the closest available mode.
func VideoModeOK(width int, height int, bpp int, flags uint32) int {
	return int(C.SDL_VideoModeOK(C.int(width), C.int(height), C.int(bpp), C.Uint32(flags)))
}
開發者ID:gnanderson,項目名稱:Go-SDL,代碼行數:5,代碼來源:sdl.go

示例4: VideoModeOK

// Check to see if a particular video mode is supported.
// It returns 0 if the requested mode is not supported under any bit depth,
// or returns the bits-per-pixel of the closest available mode with the
// given width and height.  If this bits-per-pixel is different from the
// one used when setting the video mode, SetVideoMode() will succeed,
// but will emulate the requested bits-per-pixel with a shadow surface.
//
// The arguments to SDL_VideoModeOK() are the same ones you would pass to
// SDL_SetVideoMode()
func VideoModeOK(width, height, bpp int, flags uint32) bool {
	return i2b(int(C.SDL_VideoModeOK(C.int(width), C.int(height),
		C.int(bpp), C.Uint32(flags))))
}
開發者ID:beoran,項目名稱:fungo,代碼行數:13,代碼來源:video.go


注:本文中的C.SDL_VideoModeOK函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。