I\'m working through the excellent tutorials at arcsynthesis while building a graphics engine and have discovered I don\'t understand VAOs as much as I thought I had.
F
Do I only need to call glBindBuffer again if I change the data in the buffer?
Yes, The VAO object remembers which buffers were bound each time you called glVertexAttribPointer
whilst that VAO was bound, so you don't usually need to call glBindBuffer
again. If you want to change the data in the buffer however, OpenGL needs to know which buffer you are changing, so you need to call glBindBuffer
before calling glBufferData
. It is irrelevant which VAO object is bound at this point.