commit | 553b89eade09af190e8b6f2c36d0dfc022814cab | [log] [tgz] |
---|---|---|
author | Coşku Baş <cosku.bas@gmail.com> | Wed Feb 18 08:30:40 2015 +0200 |
committer | Dmitri Shuralyov <shurcooL@gmail.com> | Sat Feb 21 18:51:45 2015 -0800 |
tree | dfcfe1cec66eb83573fa8fd585d0c955ca1eab2f | |
parent | 56c13d5ddebb18422103d859f03f2e3e420541d6 [diff] |
Update doc URL for new import path
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() { // This is needed to arrange that main() runs on main thread. // See documentation for functions that are only allowed to be called from the main thread. 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() } }
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 file.Cursor
.Window.SetDropCallback
.Window.SetCharModsCallback
.PostEmptyEvent
.CreateCursor
.CreateStandardCursor
.Cursor.Destroy
.Window.SetCursor
.Window.GetFrameSize
.Floating
.AutoIconify
.ContextReleaseBehavior
.DoubleBuffer
.AnyReleaseBehavior
.ReleaseBehaviorFlush
.ReleaseBehaviorNone
.DontCare
.Window.Iconfiy
Returns an error.Window.Restore
Returns an error.Init
Returns an error instead of bool
.GetJoystickAxes
No longer returns an error.GetJoystickButtons
No longer returns an error.GetJoystickName
No longer returns an error.GetMonitors
No longer returns an error.GetPrimaryMonitor
No longer returns an error.Monitor.GetGammaRamp
No longer returns an error.Monitor.GetVideoMode
No longer returns an error.Monitor.GetVideoModes
No longer returns an error.GetCurrentContext
No longer returns an error.Window.SetCharCallback
Accepts rune
instead of uint
.Error
.SetErrorCallback
.NotInitialized
.NoCurrentContext
.InvalidEnum
.InvalidValue
.OutOfMemory
.PlatformError
.KeyBracket
.Window.SetCharacterCallback
to Window.SetCharCallback
.Window.GetCursorPosition
to GetCursorPos
.Window.SetCursorPosition
to SetCursorPos
.CursorPositionCallback
to CursorPosCallback
.Window.SetCursorPositionCallback
to SetCursorPosCallback
.VideoMode
to VidMode
.Monitor.GetPosition
to Monitor.GetPos
.Window.GetPosition
to Window.GetPos
.Window.SetPosition
to Window.SetPos
.Window.GetAttribute
to Window.GetAttrib
.Window.SetPositionCallback
to Window.SetPosCallback
.PositionCallback
to PosCallback
.Cursor
to CursorMode
.StickyKeys
to StickyKeysMode
.StickyMouseButtons
to StickyMouseButtonsMode
.ApiUnavailable
to APIUnavailable
.ClientApi
to ClientAPI
.OpenglForwardCompatible
to OpenGLForwardCompatible
.OpenglDebugContext
to OpenGLDebugContext
.OpenglProfile
to OpenGLProfile
.SrgbCapable
to SRGBCapable
.OpenglApi
to OpenGLAPI
.OpenglEsApi
to OpenGLESAPI
.OpenglAnyProfile
to OpenGLAnyProfile
.OpenglCoreProfile
to OpenGLCoreProfile
.OpenglCompatProfile
to OpenGLCompatProfile
.KeyKp...
to KeyKP...
.