commit | 767cbc85d0d7948f593ad39880eb4a31015b1341 | [log] [tgz] |
---|---|---|
author | Stephen Gutekanst <stephen.gutekanst@gmail.com> | Tue Jan 20 15:39:40 2015 -0700 |
committer | Dmitri Shuralyov <shurcooL@gmail.com> | Sat Feb 21 18:51:44 2015 -0800 |
tree | ba9b2ae21c6987f92957ad389f8e89d34656b7c5 | |
parent | a81c8cbb2f2f4ea8aedefbfd27aed6ea685837c9 [diff] |
Return less errors; Fixes #118 For details about this solution see the documentation for acceptError, panicError, and issue #118.
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() } }
The revision of GLFW C library used is listed in GLFW_C_REVISION.txt file.
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).