Last active
August 29, 2015 13:56
-
-
Save kiryl/9297779 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/go-gl/gl" | |
glfw "github.com/go-gl/glfw3" | |
"runtime" | |
) | |
func main() { | |
runtime.LockOSThread() | |
if !glfw.Init() { | |
panic("Failed to initialize GLFW") | |
} | |
defer glfw.Terminate() | |
glfw.WindowHint(glfw.ContextVersionMajor, 3) | |
glfw.WindowHint(glfw.ContextVersionMinor, 2) | |
glfw.WindowHint(glfw.OpenglProfile, glfw.OpenglCoreProfile) | |
window, err := glfw.CreateWindow(300, 300, "test", nil, nil) | |
if err != nil { | |
panic(err) | |
} | |
defer window.Destroy() | |
window.MakeContextCurrent() | |
gl.CreateProgram() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SIGSEGV: segmentation violation | |
PC=0x0 | |
signal arrived during cgo execution | |
runtime.cgocall(0x416100, 0x7fd668450ee0) | |
/usr/lib/go/src/pkg/runtime/cgocall.c:149 +0x11b fp=0x7fd668450ec8 | |
github.com/go-gl/gl._Cfunc_glCreateProgram(0x22ce140) | |
github.com/go-gl/gl/_obj/_cgo_defun.c:781 +0x31 fp=0x7fd668450ee0 | |
github.com/go-gl/gl.CreateProgram(0xc210041000) | |
/home/kas/opt/go/src/github.com/go-gl/gl/program.go:18 +0x1e fp=0x7fd668450ef0 | |
main.main() | |
/home/kas/git/public/gotest/test.go:24 +0x174 fp=0x7fd668450f48 | |
runtime.main() | |
/usr/lib/go/src/pkg/runtime/proc.c:220 +0x11f fp=0x7fd668450fa0 | |
runtime.goexit() | |
/usr/lib/go/src/pkg/runtime/proc.c:1394 fp=0x7fd668450fa8 | |
goroutine 3 [syscall]: | |
runtime.goexit() | |
/usr/lib/go/src/pkg/runtime/proc.c:1394 | |
rax 0x7fd668422230 | |
rbx 0x7fd668450ee0 | |
rcx 0x7fd668450ee0 | |
rdx 0x7fd668450e78 | |
rdi 0x7fd668450ee0 | |
rsi 0x73be40 | |
rbp 0x741680 | |
rsp 0x7fff2d6e7688 | |
r8 0xc210001120 | |
r9 0x7fd668450e78 | |
r10 0x0 | |
r11 0x202 | |
r12 0x0 | |
r13 0x7fff2d6e77f0 | |
r14 0x0 | |
r15 0x0 | |
rip 0x0 | |
rflags 0x10206 | |
cs 0x33 | |
fs 0x0 | |
gs 0x0 | |
exit status 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment