ccpgames/glfw

Name: glfw

Owner: CCP Games

Description: Glfw 3.3 support for headless docker renderer

Created: 2017-05-11 15:27:01.0

Updated: 2017-05-11 15:33:20.0

Pushed: 2017-05-11 15:32:10.0

Homepage: null

Size: 1615

Language: C

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

GLFW 3.2 for Go Build Status GoDoc

Installation
et -u github.com/go-gl/glfw/v3.2/glfw
Usage
age main

rt (
"runtime"
"github.com/go-gl/glfw/v3.2/glfw"


 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()


 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()
}

Changelog
GLFW 3.2 Specfic Changes
GLFW 3.1 Specfic Changes
API changes

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.