I'm using Go, the line causing the segfault is:
shader := gl.CreateShader(shaderType)
I'm basing my code on this example from go-gl repo, which was working, so gl
seems to be fine.
Most of my googling pointed to C++ questions to which the answer was to enable glewExperimental
, but the Go bindings for OpenGL were generated with GLOW
, which apparently circumvents GLEW
.
I am initializing my glfw contetxt:
if err := glfw.Init(); err != nil {
log.Fatalln("failed to initialize glfw:", err)
}
and the gl
library:
// Initialize Glow
if err := gl.Init(); err != nil {
panic(err)
}
Is there anything I'm missing? Are there any principles I can use to track this down, i.e. "glCreateShader() Segfaults when XYZ occurs"?