当前位置: 首页>>代码示例>>Golang>>正文


Golang C.SDL_GetVideoInfo函数代码示例

本文整理汇总了Golang中C.SDL_GetVideoInfo函数的典型用法代码示例。如果您正苦于以下问题:Golang SDL_GetVideoInfo函数的具体用法?Golang SDL_GetVideoInfo怎么用?Golang SDL_GetVideoInfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SDL_GetVideoInfo函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: GetVideoInfo

func GetVideoInfo() *VideoInfo {
	vinfo := (*internalVideoInfo)(cast(C.SDL_GetVideoInfo()))

	flags := vinfo.Flags

	return &VideoInfo{
		HW_available: flags&(1<<0) != 0,
		WM_available: flags&(1<<1) != 0,
		Blit_hw:      flags&(1<<9) != 0,
		Blit_hw_CC:   flags&(1<<10) != 0,
		Blit_hw_A:    flags&(1<<11) != 0,
		Blit_sw:      flags&(1<<12) != 0,
		Blit_sw_CC:   flags&(1<<13) != 0,
		Blit_sw_A:    flags&(1<<14) != 0,
		Blit_fill:    flags&(1<<15) != 0,
		Video_mem:    vinfo.Video_mem,
		Vfmt:         vinfo.Vfmt,
		Current_w:    vinfo.Current_w,
		Current_h:    vinfo.Current_h,
	}
}
开发者ID:gnanderson,项目名称:Go-SDL,代码行数:21,代码来源:sdl.go

示例2: GetVideoInfo

func GetVideoInfo() VideoInfo {
	ptr := C.SDL_GetVideoInfo()
	return VideoInfo{unsafe.Pointer(ptr)}
}
开发者ID:badgerodon,项目名称:go,代码行数:4,代码来源:video.go

示例3: getVideoInfo

// This function returns a read-only pointer to information about the
// video hardware.  If this is called before SetVideoMode(), the 'vfmt'
// member of the returned structure will contain the pixel format of the
// "best" video mode.
func getVideoInfo() *C.SDL_VideoInfo {
	return C.SDL_GetVideoInfo()
}
开发者ID:beoran,项目名称:fungo,代码行数:7,代码来源:video.go


注:本文中的C.SDL_GetVideoInfo函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。