Skip to content

Instantly share code, notes, and snippets.

@nytehauq
Created February 13, 2016 11:27
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nytehauq/895c4f71dae02eb6bf15 to your computer and use it in GitHub Desktop.
package main
import (
"github.com/goxjs/gl"
"github.com/goxjs/glfw"
)
func main() {
if err := glfw.Init(gl.ContextWatcher); err != nil {
panic(err)
}
if screen, err := glfw.CreateWindow(10, 10, "title", nil, nil); err != nil {
panic(err)
} else {
screen.MakeContextCurrent()
}
gl.TexImage2D(gl.TEXTURE_2D, 0, 10, 10, gl.RGBA, gl.UNSIGNED_BYTE, nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment