Vertex Array Objects - Confusion regarding exactly what state information is saved about the currently bound vertex buffer

蹲街弑〆低调 提交于 2019-12-03 12:41:16

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!