understanding glVertexAttribPointer?

@datenwolf already covered the key aspect in a comment above. To elaborate some more: You do not have to bind GL_ARRAY_BUFFER again before the glDrawElements() call. What matters is that the buffer you want to source a given attribute from is bound when you make the glVertexAttribPointer() call for that attribute. The best way to picture this is that when you make this … Read more

What exactly is a VBO in OpenGL?

I think you are mixing up lots of different things and have several confusions, so I’m try to work through most of them in the order you brought them up: when we declare a series of vertices, let’s say 3 vertices that form a triangle primitive, we basically store those nowhere, they’re simply declared in … Read more