Closed fanmanpro closed 7 years ago
Everything was working 100% until I did some refactoring and now I'm getting the stranges error
Does it still work if you go back to the version before the refactor?
If so, can you identify which (minimal) change it was that started causing this?
So far, this looks like you're doing something wrong in the user code.
Thanks @shurcooL In terms of the user code it is fairly simple:
var vertexArrayID uint32
gl.GenVertexArrays(1, &vertexArrayID) // ERROR IS HERE
gl.BindVertexArray(vertexArrayID)
The above code didn't change after the refactoring and I can't think of anything in the code that could interfere with the first two lines.
However, I agree with you that it is likely not something in the go-gl package but how it is used. Is there perhaps a "checklist" of things to avoid to prevent memory errors?
Are you successfully creating an OpenGL context? Is it the right version?
The cube example does something very similar, does it work ok for you?
Are you successfully creating an OpenGL context?
Nope, context was created only afterwards. What threw me off was that the empty scene still worked without having to create a OpenGL context. Thanks so much @shurcooL
I've been using Go's go-gl package for quite a while now. Everything was working 100% until I did some refactoring and now I'm getting the stranges error:
I've updated my drivers and a empty OpenGL scene works 100% without generating vertex arrays.
Here is my go env
Thanks