Skip to content

Instantly share code, notes, and snippets.

@banthar
Forked from manveru/mini.go
Created May 26, 2010 13:33
Show Gist options
  • Save banthar/414478 to your computer and use it in GitHub Desktop.
Save banthar/414478 to your computer and use it in GitHub Desktop.
package main
import (
"gl"
"sdl"
)
func main() {
if sdl.Init(sdl.INIT_VIDEO) != 0 {
println("Video initialization failed: " + sdl.GetError())
return
}
defer sdl.Quit()
surface := sdl.SetVideoMode(640, 480, 0, sdl.ANYFORMAT|sdl.RESIZABLE|sdl.OPENGL)
if surface == nil {
println("Video mode set failed: " + sdl.GetError())
return
}
err := gl.Init()
if err != 0 {
println("OpenGL initialization failed: " + gl.GetErrorString(err))
return
}
}
@manveru
Copy link

manveru commented May 27, 2010

Yeah, that still segfaults :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment