commit | 8e6f5ef273dd811d19cefcb695b1fdc07d75169f | [log] [tgz] |
---|---|---|
author | Stephen Gutekanst <stephen.gutekanst@gmail.com> | Sat Sep 20 19:25:03 2014 -0700 |
committer | Dmitri Shuralyov <shurcooL@gmail.com> | Sat Feb 21 18:51:41 2015 -0800 |
tree | 914ec8992011c5b918c22d061cec5e21c53e3418 | |
parent | da30af834a8de18ed95e089b2f59fe504e689546 [diff] |
Streamline error handling by using fetchError() instead of <-lastError.
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).