commit | c7ee9b057895fe44bf232e4177d46de36a9c22bd | [log] [tgz] |
---|---|---|
author | Dmitri Shuralyov <shurcooL@gmail.com> | Sun Jan 04 17:15:04 2015 -0800 |
committer | Dmitri Shuralyov <shurcooL@gmail.com> | Sat Feb 21 18:51:42 2015 -0800 |
tree | 51762547e60ed9646ff6bdab8417ba5b6c5f5e71 | |
parent | 811fe928d7c61fa8c279c074fdc718996ad07c04 [diff] |
Rename Character to Char to match upstream API naming. This adds a breaking API change by renaming `SetCharacterCallback` to and `SetCharCallback`, and `SetCharacterModsCallback` to `SetCharModsCallback`. Updating is easy thanks to static type checking, and can be automated with `gofmt`: gofmt -w -r 'x.SetCharacterCallback -> x.SetCharCallback' *.go gofmt -w -r 'x.SetCharacterModsCallback -> x.SetCharModsCallback' *.go Closes #105.
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).