change window background to blue

This commit is contained in:
mollusk 2018-01-15 22:50:18 -07:00
parent 374f37b751
commit 5d80390e0b

View File

@ -4,6 +4,7 @@ package main
import ( import (
"github.com/faiface/pixel" "github.com/faiface/pixel"
"github.com/faiface/pixel/pixelgl" "github.com/faiface/pixel/pixelgl"
"golang.org/x/image/colornames"
//"github.com/go-gl/glfw/v3.2/glfw" //"github.com/go-gl/glfw/v3.2/glfw"
) )
@ -11,6 +12,7 @@ func run() {
cfg := pixelgl.WindowConfig{ cfg := pixelgl.WindowConfig{
Title: "Pixel Rocks!", Title: "Pixel Rocks!",
Bounds: pixel.R(0, 0, 1024, 768), Bounds: pixel.R(0, 0, 1024, 768),
VSync: true,
} }
win, err := pixelgl.NewWindow(cfg) win, err := pixelgl.NewWindow(cfg)
@ -18,6 +20,8 @@ func run() {
panic(err) panic(err)
} }
win.Clear(colornames.Skyblue)
for !win.Closed() { for !win.Closed() {
win.Update() win.Update()
} }