Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does glDeleteVertexArrays lead to deletion of VBOs, associated with VAO being deleted?

Tags:

opengl

vbo

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?

like image 803
Sergey Avatar asked Jan 11 '13 09:01

Sergey


People also ask

Does binding VAO bind VBO?

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.

What does VAO stand for OpenGL?

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.

What is VBO and VAO in OpenGL?

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.

What are 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.


1 Answers

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.

like image 75
Nicol Bolas Avatar answered Sep 29 '22 06:09

Nicol Bolas