draw basic window
This commit is contained in:
parent
532213ab56
commit
efcc3bf5e8
24
main.go
24
main.go
@ -2,9 +2,27 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"github.com/faiface/pixel"
|
||||||
|
"github.com/faiface/pixel/pixelgl"
|
||||||
|
//"github.com/go-gl/glfw/v3.2/glfw"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func run() {
|
||||||
fmt.Println("Hello project-rpg!")
|
cfg := pixelgl.WindowConfig{
|
||||||
|
Title: "Pixel Rocks!",
|
||||||
|
Bounds: pixel.R(0, 0, 1024, 768),
|
||||||
|
}
|
||||||
|
|
||||||
|
win, err := pixelgl.NewWindow(cfg)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
for !win.Closed() {
|
||||||
|
win.Update()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
pixelgl.Run(run)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user