commit | 1babc432b17b5379913cfefcd32801a20e6fc341 | [log] [tgz] |
---|---|---|
author | Dmitri Shuralyov <shurcooL@gmail.com> | Tue Sep 23 21:20:29 2014 -0700 |
committer | Dmitri Shuralyov <shurcooL@gmail.com> | Sat Feb 21 18:51:42 2015 -0800 |
tree | ec58f525555ae16dbc022f55020299c2904d6937 | |
parent | 7913c17ac4a246be4eb0772b464127671c8e21d0 [diff] |
Minor cleanup. Change error printing to be consistent with 65a04face02544d1b4a257388693f7d9ab2d4157.
go get github.com/go-gl/glfw3
and be done (GLFW sources are included so you don't have to build GLFW on your own)!package main import ( "runtime" glfw "github.com/go-gl/glfw3" ) func init() { runtime.LockOSThread() } func main() { err := glfw.Init() if err != nil { panic(err) } defer glfw.Terminate() window, err := glfw.CreateWindow(640, 480, "Testing", nil, nil) if err != nil { panic(err) } window.MakeContextCurrent() for !window.ShouldClose() { // Do OpenGL stuff window.SwapBuffers() glfw.PollEvents() } }
Floating
and AutoIconify
window hints.go get
installation (GLFW source code included in-repo and compiled in so you don't have to build GLFW on your own first and you don't have to distribute shared libraries).