project-rpg/main.go

33 lines
471 B
Go
Raw Normal View History

2018-01-15 21:41:59 -07:00
// main
package main
import (
2018-01-15 22:42:11 -07:00
"github.com/faiface/pixel"
"github.com/faiface/pixel/pixelgl"
2018-01-15 22:50:18 -07:00
"golang.org/x/image/colornames"
2018-01-15 22:42:11 -07:00
//"github.com/go-gl/glfw/v3.2/glfw"
2018-01-15 21:41:59 -07:00
)
2018-01-15 22:42:11 -07:00
func run() {
cfg := pixelgl.WindowConfig{
Title: "Pixel Rocks!",
Bounds: pixel.R(0, 0, 1024, 768),
2018-01-15 22:50:18 -07:00
VSync: true,
2018-01-15 22:42:11 -07:00
}
win, err := pixelgl.NewWindow(cfg)
if err != nil {
panic(err)
}
2018-01-15 22:50:18 -07:00
win.Clear(colornames.Skyblue)
2018-01-15 22:42:11 -07:00
for !win.Closed() {
win.Update()
}
}
2018-01-15 21:41:59 -07:00
func main() {
2018-01-15 22:42:11 -07:00
pixelgl.Run(run)
2018-01-15 21:41:59 -07:00
}