Skip to content

Instantly share code, notes, and snippets.

@manveru
Created May 26, 2010 13:19
Show Gist options
  • Save manveru/414458 to your computer and use it in GitHub Desktop.
Save manveru/414458 to your computer and use it in GitHub Desktop.
package main
import (
"gl"
"sdl"
)
func main() {
if sdl.Init(sdl.INIT_VIDEO) < 0 {
panic("Video initialization failed: " + sdl.GetError())
}
surface := sdl.SetVideoMode(640, 480, 32, sdl.RESIZABLE)
if surface == nil {
panic("Video mode set failed: " + sdl.GetError())
sdl.Quit()
}
if gl.Init() != 0 {
panic(gl.GetErrorString(gl.GetError()))
sdl.Quit()
}
sdl.Quit()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment