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


Golang C.SDL_Flip函数代码示例

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


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

示例1: Flip

func (this Surface) Flip() error {
	c_surface := (*C.SDL_Surface)(this.Ptr)
	ret := C.SDL_Flip(c_surface)
	if ret == 0 {
		return nil
	}
	return GetError()
}
开发者ID:badgerodon,项目名称:go,代码行数:8,代码来源:surface.go

示例2: Flip

// Swaps screen buffers.
func (screen *Surface) Flip() int {
	GlobalMutex.Lock()
	screen.mutex.Lock()

	status := int(C.SDL_Flip(screen.cSurface))

	screen.mutex.Unlock()
	GlobalMutex.Unlock()

	return status
}
开发者ID:kearsley,项目名称:Go-SDL,代码行数:12,代码来源:sdl.go

示例3: MainIteration

func MainIteration() (quit bool) {
	select {
	case <-kill:
		quit = true
	default:
		for _, a := range drawers {
			a.canvas.pane = screen
			a.canvas.load()
			a.drawer.Draw(&a.canvas)
		}
		C.SDL_Flip(screen)
	}
	time.Sleep(16000000)
	quit = false
	return
}
开发者ID:griffy,项目名称:starfish,代码行数:16,代码来源:display.go

示例4: Flip

// Swaps screen buffers.
func (screen *Surface) Flip() int { return int(C.SDL_Flip((*C.SDL_Surface)(cast(screen)))) }
开发者ID:gnanderson,项目名称:Go-SDL,代码行数:2,代码来源:sdl.go

示例5: Flip

// Flip swaps screen buffers with a double-buffered display mode. Use it to
// make the changes you made to the screen become visible.
func Flip() {
	mutex.Lock()
	defer mutex.Unlock()

	C.SDL_Flip(C.SDL_GetVideoSurface())
}
开发者ID:rsaarelm,项目名称:teratogen,代码行数:8,代码来源:video.go

示例6: flip

// On hardware that supports double-buffering, this function sets up a flip
// and returns.  The hardware will wait for vertical retrace, and then swap
// video buffers before the next video surface blit or lock will return.
// On hardware that doesn not support double-buffering, this is equivalent
// to calling SDL_UpdateRect(screen, 0, 0, 0, 0);
// The SDL_DOUBLEBUF flag must have been passed to SDL_SetVideoMode() when
// setting the video mode for this function to perform hardware flipping.
// This function returns 0 if successful, or -1 if there was an error.
func flip(screen *C.SDL_Surface) {
	C.SDL_Flip(screen)
}
开发者ID:beoran,项目名称:fungo,代码行数:11,代码来源:video.go


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