예제 #1
0
파일: demo.go 프로젝트: niksaak/goticles
func main() {
	{ // Profiling
		cpu, err := os.Create("cpu.prof")
		if err != nil {
			panic(err)
		}
		defer cpu.Close()
		pprof.StartCPUProfile(cpu)
		defer pprof.StopCPUProfile()
	}

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	params := engine.Params{
		Version: [2]int{4, 3},
		Size:    [2]int{512, 512},
	}
	engine := engine.New()
	if err := engine.Initialize("TICKLES", params, &MainState{}); err != nil {
		panic(err)
	}
	if err := engine.Run(); err != nil {
		panic(err)
	}
	if err := engine.Shutdown(); err != nil {
		panic(err)
	}
}
예제 #2
0
파일: demo.go 프로젝트: niksaak/goticles
func main() {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	params := engine.Params{
		Version: [2]int{4, 4},
		Size:    [2]int{512, 512},
	}
	engine := engine.New()
	if err := engine.Initialize("GPU TICKLES", params, &MainState{}); err != nil {
		panic(err)
	}
	if err := engine.Run(); err != nil {
		panic(err)
	}
	if err := engine.Shutdown(); err != nil {
		panic(err)
	}
}