コード例 #1
0
ファイル: app.go プロジェクト: rockxcn/mobile
func (app) EndPaint(e paint.Event) {
	// gl.Flush is a lightweight (on modern GL drivers) blocking call
	// that ensures all GL functions pending in the gl package have
	// been passed onto the GL driver before the app package attempts
	// to swap the screen buffer.
	//
	// This enforces that the final receive (for this paint cycle) on
	// gl.WorkAvailable happens before the send on endPaint.
	gl.Flush()
	endPaint <- e
}
コード例 #2
0
ファイル: app.go プロジェクト: paulhankin/mobile
func (app) Publish() PublishResult {
	// gl.Flush is a lightweight (on modern GL drivers) blocking call
	// that ensures all GL functions pending in the gl package have
	// been passed onto the GL driver before the app package attempts
	// to swap the screen buffer.
	//
	// This enforces that the final receive (for this paint cycle) on
	// gl.WorkAvailable happens before the send on endPaint.
	gl.Flush()
	publish <- struct{}{}
	return <-publishResult
}
コード例 #3
0
ファイル: app.go プロジェクト: SpruceHealth/mobile
func (app) EndDraw() {
	// gl.Flush is a lightweight (on modern GL drivers) blocking call
	// that ensures all GL functions pending in the gl package have
	// been passed onto the GL driver before the app package attempts
	// to swap the screen buffer.
	//
	// This enforces that the final receive (for this draw cycle) on
	// gl.WorkAvailable happens before the send on endDraw.
	gl.Flush()

	select {
	case endDraw <- struct{}{}:
	default:
	}
}