I tried to use this tutorial with Golang: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/ The go-version opens the window and makes the bac
I had the same problem and I managed to fix it after looking at your post, so first of all thanks a lot.
I managed to display a triangle by using the work branch of banthar bindings with this call to AttribPointer
:
vertexAttrib.AttribPointer(
3, // size
gl.FLOAT, //type
false, // normalized?
0, // stride
nil) // array buffer offset
and by passing the size in bytes to BufferData.
[...]
data := []float32{0, 1, 0, -1, -1, 0, 1, -1, 0}
[...]
gl.BufferData(gl.ARRAY_BUFFER, len(data)*4, data, gl.STATIC_DRAW)
[...]
There is probably a better way to pass the right length.