当前位置: 首页>>代码示例>>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;未经允许,请勿转载。