{"id":37175714,"url":"https://github.com/visualfc/glfw-2","last_synced_at":"2026-01-14T20:30:49.069Z","repository":{"id":57510387,"uuid":"231394246","full_name":"visualfc/glfw-2","owner":"visualfc","description":"Go bindings for GLFW 3","archived":false,"fork":true,"pushed_at":"2015-12-20T15:24:50.000Z","size":1079,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"feature/add-ime-support","last_synced_at":"2025-10-01T05:25:24.986Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"shibukawa/glfw-2","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/visualfc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-02T14:07:18.000Z","updated_at":"2020-01-02T14:07:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/visualfc/glfw-2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/visualfc/glfw-2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualfc%2Fglfw-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualfc%2Fglfw-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualfc%2Fglfw-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualfc%2Fglfw-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/visualfc","download_url":"https://codeload.github.com/visualfc/glfw-2/tar.gz/refs/heads/feature/add-ime-support","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visualfc%2Fglfw-2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T20:30:48.362Z","updated_at":"2026-01-14T20:30:49.055Z","avatar_url":"https://github.com/visualfc.png","language":null,"readme":"# GLFW 3.1 for Go [![Build Status](https://travis-ci.org/go-gl/glfw.svg?branch=master)](https://travis-ci.org/go-gl/glfw) [![GoDoc](https://godoc.org/github.com/go-gl/glfw/v3.1/glfw?status.svg)](https://godoc.org/github.com/go-gl/glfw/v3.1/glfw)\n\n## Installation\n\n* GLFW C library source is included and built automatically as part of the Go package. But you need to make sure you have dependencies of GLFW:\n\t* On OS X, you need Xcode or Command Line Tools for Xcode (`xcode-select --install`) for required headers and libraries.\n\t* On Ubuntu/Debian-like Linux distributions, you need `libgl1-mesa-dev` and `xorg-dev` packages.\n\t* See [here](http://www.glfw.org/docs/latest/compile.html#compile_deps) for full details.\n* Go 1.4+ is required on Windows (otherwise you must use MinGW v4.8.1 exactly, see [Go issue 8811](https://github.com/golang/go/issues/8811)).\n\n```\ngo get -u github.com/go-gl/glfw/v3.1/glfw\n```\n\n## Usage\n\n```Go\npackage main\n\nimport (\n\t\"runtime\"\n\t\"github.com/go-gl/glfw/v3.1/glfw\"\n)\n\nfunc init() {\n\t// This is needed to arrange that main() runs on main thread.\n\t// See documentation for functions that are only allowed to be called from the main thread.\n\truntime.LockOSThread()\n}\n\nfunc main() {\n\terr := glfw.Init()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer glfw.Terminate()\n\n\twindow, err := glfw.CreateWindow(640, 480, \"Testing\", nil, nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\twindow.MakeContextCurrent()\n\n\tfor !window.ShouldClose() {\n\t\t// Do OpenGL stuff.\n\t\twindow.SwapBuffers()\n\t\tglfw.PollEvents()\n\t}\n}\n```\n\n## Changelog\n\n* Easy `go get` installation. GLFW source code is now included in-repo and compiled in so you don't have to build GLFW on your own and distribute shared libraries. The revision of GLFW C library used is listed in [GLFW_C_REVISION.txt](https://github.com/go-gl/glfw/blob/master/v3.1/glfw/GLFW_C_REVISION.txt) file.\n* The error callback is now set internally. Functions return an error with corresponding code and description (do a type assertion to glfw3.Error for accessing the variables) if the error is recoverable. If not a panic will occur.\n\n### GLFW 3.1 Specfic Changes\n* Added type `Cursor`.\n* Added function `Window.SetDropCallback`.\n* Added function `Window.SetCharModsCallback`.\n* Added function `PostEmptyEvent`.\n* Added function `CreateCursor`.\n* Added function `CreateStandardCursor`.\n* Added function `Cursor.Destroy`.\n* Added function `Window.SetCursor`.\n* Added function `Window.GetFrameSize`.\n* Added window hint `Floating`.\n* Added window hint `AutoIconify`.\n* Added window hint `ContextReleaseBehavior`.\n* Added window hint `DoubleBuffer`.\n* Added hint value `AnyReleaseBehavior`.\n* Added hint value `ReleaseBehaviorFlush`.\n* Added hint value `ReleaseBehaviorNone`.\n* Added hint value `DontCare`.\n\n### API changes\n* `Window.Iconfiy` Returns an error.\n* `Window.Restore` Returns an error.\n* `Init` Returns an error instead of `bool`.\n* `GetJoystickAxes` No longer returns an error.\n* `GetJoystickButtons` No longer returns an error.\n* `GetJoystickName` No longer returns an error.\n* `GetMonitors` No longer returns an error.\n* `GetPrimaryMonitor` No longer returns an error.\n* `Monitor.GetGammaRamp` No longer returns an error.\n* `Monitor.GetVideoMode` No longer returns an error.\n* `Monitor.GetVideoModes` No longer returns an error.\n* `GetCurrentContext` No longer returns an error.\n* `Window.SetCharCallback` Accepts `rune` instead of `uint`.\n* Added type `Error`.\n* Removed `SetErrorCallback`.\n* Removed error code `NotInitialized`.\n* Removed error code `NoCurrentContext`.\n* Removed error code `InvalidEnum`.\n* Removed error code `InvalidValue`.\n* Removed error code `OutOfMemory`.\n* Removed error code `PlatformError`.\n* Removed `KeyBracket`.\n* Renamed `Window.SetCharacterCallback` to `Window.SetCharCallback`.\n* Renamed `Window.GetCursorPosition` to `GetCursorPos`.\n* Renamed `Window.SetCursorPosition` to `SetCursorPos`.\n* Renamed `CursorPositionCallback` to `CursorPosCallback`.\n* Renamed `Window.SetCursorPositionCallback` to `SetCursorPosCallback`.\n* Renamed `VideoMode` to `VidMode`.\n* Renamed `Monitor.GetPosition` to `Monitor.GetPos`.\n* Renamed `Window.GetPosition` to `Window.GetPos`.\n* Renamed `Window.SetPosition` to `Window.SetPos`.\n* Renamed `Window.GetAttribute` to `Window.GetAttrib`.\n* Renamed `Window.SetPositionCallback` to `Window.SetPosCallback`.\n* Renamed `PositionCallback` to `PosCallback`.\n* Ranamed `Cursor` to `CursorMode`.\n* Renamed `StickyKeys` to `StickyKeysMode`.\n* Renamed `StickyMouseButtons` to `StickyMouseButtonsMode`.\n* Renamed `ApiUnavailable` to `APIUnavailable`.\n* Renamed `ClientApi` to `ClientAPI`.\n* Renamed `OpenglForwardCompatible` to `OpenGLForwardCompatible`.\n* Renamed `OpenglDebugContext` to `OpenGLDebugContext`.\n* Renamed `OpenglProfile` to `OpenGLProfile`.\n* Renamed `SrgbCapable` to `SRGBCapable`.\n* Renamed `OpenglApi` to `OpenGLAPI`.\n* Renamed `OpenglEsApi` to `OpenGLESAPI`.\n* Renamed `OpenglAnyProfile` to `OpenGLAnyProfile`.\n* Renamed `OpenglCoreProfile` to `OpenGLCoreProfile`.\n* Renamed `OpenglCompatProfile` to `OpenGLCompatProfile`.\n* Renamed `KeyKp...` to `KeyKP...`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisualfc%2Fglfw-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvisualfc%2Fglfw-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisualfc%2Fglfw-2/lists"}