According to this question, glDeleteBuffers marks buffer's video memory as free. But when I call glDeleteVertexArrays on a VAO, will this call delete all VBOs, linked with this VAO?
If no, when should I delete VBOs? Before deleting the VAO or after that?
All the articles on the internet on VAO's show that binding a VAO automatically binds the VBO. So, I think a VAO is a configuration that holds both glVertexAttribPointer states and the glBindBuffer state.
A Vertex Array Object (VAO) is an object which contains one or more Vertex Buffer Objects and is designed to store the information for a complete rendered object. In our example this is a diamond consisting of four vertices as well as a color for each vertex.
A VBO is a buffer of memory which the gpu can access. That's all it is. A VAO is an object that stores vertex bindings. This means that when you call glVertexAttribPointer and friends to describe your vertex format that format information gets stored into the currently bound VAO.
Voting Assistance Officers (VAOs) work to ensure that military and overseas voters understand their voting rights, how to register to vote absentee, and have access to accurate nonpartisan voting information and assistance.
But when I call glDeleteVertexArrays on a VAO, will this call delete all VBOs, linked with this VAO?
No. It will simply no longer reference them. And if you have deleted those buffer objects, and no other objects reference them, (FYI: VAOs are not the only things that can reference buffer objects), and they are not bound to any context, then their storage will be destroyed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With