package main import ( "github.com/hajimehoshi/go-ebiten" "github.com/hajimehoshi/go-ebiten/example/game/blank" "github.com/hajimehoshi/go-ebiten/example/game/input" "github.com/hajimehoshi/go-ebiten/example/game/monochrome" "github.com/hajimehoshi/go-ebiten/example/game/rects" "github.com/hajimehoshi/go-ebiten/example/game/rotating" "github.com/hajimehoshi/go-ebiten/example/game/sprites" "github.com/hajimehoshi/go-ebiten/ui" "github.com/hajimehoshi/go-ebiten/ui/cocoa" _ "github.com/hajimehoshi/go-ebiten/ui/glut" "os" "runtime" ) func main() { runtime.GOMAXPROCS(runtime.NumCPU()) gameName := "" if 2 <= len(os.Args) { gameName = os.Args[1] } var game ebiten.Game switch gameName { case "blank": game = blank.New() case "input": game = input.New() case "monochrome": game = monochrome.New() case "rects": game = rects.New() case "rotating": game = rotating.New() case "sprites": game = sprites.New() default: game = rotating.New() } const screenScale = 2 cocoaUI := cocoa.New(256, 240, screenScale, "Ebiten Demo") ui.Run(cocoaUI, game) }