Beispiel #1
0
func check() {
	error := gl.GetError()
	if error != 0 {
		debug.PrintStack()
		panic(fmt.Sprintf("An error occurred! Code: 0x%x", error))
	}
}
Beispiel #2
0
func main() {
	state.verbose = 1
	// Start OGLES
	initOGL(&state)
	for {
		if error := gl.GetError(); error != 0 {
			panic(fmt.Sprintf("An error occured with code: 0x%x\n", error))
		}
		egl.SwapBuffers(state.display, state.surface)
	}
}