summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoşku Baş <cosku.bas@gmail.com>2015-01-23 16:21:26 +0200
committerCoşku Baş <cosku.bas@gmail.com>2015-01-23 16:21:26 +0200
commitda0b6a69062d84460ae152b65a2e2d1f44b3fd17 (patch)
tree07e408ebdbd56a7d7c6b86a0fd740898c1b2ae76
parent83f4685008de5c68e1c4df437ca48d770b4d798b (diff)
downloadglfw3-da0b6a69062d84460ae152b65a2e2d1f44b3fd17.tar.gz
README overhaul
-rw-r--r--README.md119
1 files changed, 78 insertions, 41 deletions
diff --git a/README.md b/README.md
index dbc9392..4164b13 100644
--- a/README.md
+++ b/README.md
@@ -1,30 +1,27 @@
-Go Bindings for GLFW 3
-======================
+# Go Bindings for GLFW 3
* **ATTENTION:** As of GLFW 3.1 we break API. See Changelog below.
* See [here](http://godoc.org/github.com/go-gl/glfw3) for documentation.
* You can help by submitting examples to [go-gl/examples](http://github.com/go-gl/examples).
-Remarks
-=======
+## Installation
-* Some functions -which are marked in the documentation- can be called only from the main thread. You need to use [runtime.LockOSThread()](http://godoc.org/runtime#LockOSThread) to arrange that main() runs on main thread.
* Installation is easy, just `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*)!
* Go 1.4 is required on Windows (otherwise you must use MinGW v4.8.1 exactly, see [Go issue 8811](https://code.google.com/p/go/issues/detail?id=8811)).
-Example
-=======
+## Usage
```go
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()
}
@@ -50,38 +47,78 @@ func main() {
}
```
-Changelog
-=========
+## Changelog
+
+* 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](GLFW_C_REVISION.txt) file.
+* 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.
-The revision of GLFW C library used is listed in [GLFW_C_REVISION.txt](GLFW_C_REVISION.txt) file.
+### GLFW 3.1 Specfic Changes
+* Added type `Cursor`.
+* Added function `Window.SetDropCallback`.
+* Added function `Window.SetCharModsCallback`.
+* Added function `PostEmptyEvent`.
+* Added function `CreateCursor`.
+* Added function `CreateStandardCursor`.
+* Added function `Cursor.Destroy`.
+* Added function `Window.SetCursor`.
+* Added function `Window.GetFrameSize`.
+* Added window hint `Floating`.
+* Added window hint `AutoIconify`.
+* Added window hint `ContextReleaseBehavior`.
+* Added window hint `DoubleBuffer`.
+* Added hint value `AnyReleaseBehavior`.
+* Added hint value `ReleaseBehaviorFlush`.
+* Added hint value `ReleaseBehaviorNone`.
+* Added hint value `DontCare`.
-* Type <code>glfw3.GLFWError</code> renamed to just <code>glfw3.Error</code>.
-* Method <code>window.SetCharacterCallback</code> renamed to <code>window.SetCharCallback</code>.
-* Method <code>window.SetCharacterModsCallback</code> renamed to <code>window.SetCharModsCallback</code>.
-* Added `Floating` and `AutoIconify` window hints.
-* Easy `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).
-* <code>SetErrorCallback</code> This function is removed. The 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).
-* <code>Init</code> Returns an error instead of bool.
-* <code>GetTime</code> Returns an error.
-* <code>GetCurrentContext</code> No longer returns an error.
-* <code>GetJoystickAxes</code> No longer returns an error.
-* <code>GetJoystickButtons</code> No longer returns an error.
-* <code>GetJoystickName</code> No longer returns an error.
-* <code>window.GetMonitor</code> No longer returns an error.
-* <code>window.GetAttribute</code> Returns an error.
-* <code>window.SetCharCallback</code> Accepts rune instead of uint.
-* <code>window.SetDropCallback</code> added.
-* <code>window.SetCharModsCallback</code> added.
-* <code>PostEmptyEvent</code> added.
-* Native window and context handlers added.
-* Constant <code>ApiUnavailable</code> changed to <code>APIUnavailable</code>.
-* Constant <code>ClientApi</code> changed to <code>ClientAPI</code>.
-* Constant <code>OpenglForwardCompatible</code> changed to <code>OpenGLForwardCompatible</code>.
-* Constant <code>OpenglDebugContext</code> changed to <code>OpenGLDebugContext</code>.
-* Constant <code>OpenglProfile</code> changed to <code>OpenGLProfile</code>.
-* Constant <code>SrgbCapable</code> changed to <code>SRGBCapable</code>.
-* Constant <code>OpenglApi</code> changed to <code>OpenGLAPI</code>.
-* Constant <code>OpenglEsApi</code> changed to <code>OpenGLESAPI</code>.
-* Constant <code>OpenglAnyProfile</code> changed to <code>OpenGLAnyProfile</code>.
-* Constant <code>OpenglCoreProfile</code> changed to <code>OpenGLCoreProfile</code>.
-* Constant <code>OpenglCompatProfile</code> changed to <code>OpenGLCompatProfile</code>.
+### API changes
+* `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`.
+* Added type `Error`.
+* Removed `SetErrorCallback`.
+* Removed error code `NotInitialized`.
+* Removed error code `NoCurrentContext`.
+* Removed error code `InvalidEnum`.
+* Removed error code `InvalidValue`.
+* Removed error code `OutOfMemory`.
+* Removed error code `PlatformError`.
+* Removed `KeyBracket`.
+* Renamed `Window.SetCharacterCallback` to `Window.SetCharCallback`.
+* Renamed `Window.SetCharacterModsCallback` to `Window.SetCharModsCallback`.
+* Renamed `Window.GetCursorPosition` to `GetCursorPos`.
+* Renamed `Window.SetCursorPosition` to `SetCursorPos`.
+* Renamed `CursorPositionCallback` to `CursorPosCallback`.
+* Renamed `Window.SetCursorPositionCallback` to `SetCursorPosCallback`.
+* Renamed `VideoMode` to `VidMode`.
+* Renamed `Monitor.GetPosition` to `Monitor.GetPos`.
+* Renamed `Window.GetPosition` to `Window.GetPos`.
+* Renamed `Window.SetPosition` to `Window.SetPos`.
+* Renamed `Window.GetAttribute` to `Window.GetAttrib`.
+* Renamed `Window.SetPositionCallback` to `Window.SetPosCallback`.
+* Renamed `PositionCallback` to `PosCallback`.
+* Ranamed `Cursor` to `CursorMode`.
+* Renamed `StickyKeys` to `StickyKeysMode`.
+* Renamed `StickyMouseButtons` to `StickyMouseButtonsMode`.
+* Renamed `ApiUnavailable` to `APIUnavailable`.
+* Renamed `ClientApi` to `ClientAPI`.
+* Renamed `OpenglForwardCompatible` to `OpenGLForwardCompatible`.
+* Renamed `OpenglDebugContext` to `OpenGLDebugContext`.
+* Renamed `OpenglProfile` to `OpenGLProfile`.
+* Renamed `SrgbCapable` ranamed to `SRGBCapable`.
+* Renamed `OpenglApi` to `OpenGLAPI`.
+* Renamed `OpenglEsApi` to `OpenGLESAPI`.
+* Renamed `OpenglAnyProfile` to `OpenGLAnyProfile`.
+* Renamed `OpenglCoreProfile` to `OpenGLCoreProfile`.
+* Renamed `OpenglCompatProfile` to `OpenGLCompatProfile`.
+* Renamed `KeyKp...` to `KeyKP...`.