commit | 9faad1febdcc20ff53e4821e759ceea3abeacd94 | [log] [tgz] |
---|---|---|
author | Dmitri Shuralyov <shurcooL@gmail.com> | Sun Jan 18 13:25:56 2015 -0800 |
committer | Dmitri Shuralyov <shurcooL@gmail.com> | Sat Feb 21 18:51:42 2015 -0800 |
tree | 61eccc628f22f931d79815d187c722f46190c009 | |
parent | c7ee9b057895fe44bf232e4177d46de36a9c22bd [diff] |
Update to official GLFW 3.1 release. See glfw/glfw@4188c263e31ec3d5da99a77d939ab56bc199fda6.
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).