本文整理汇总了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,
}
}
示例2: GetVideoInfo
func GetVideoInfo() VideoInfo {
ptr := C.SDL_GetVideoInfo()
return VideoInfo{unsafe.Pointer(ptr)}
}
示例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()
}