# Should I update VAO when I update a VBO?

My VAO/VBO/IBO work fine on iPad and other devices on Android excepted two (A Samsung galaxy S4 and a Sony Xperia S).

A problem is present when I start my application on this devices, every elements move everywhere and start to blink on each frame, the problem is present on every element updated during the simulation.

I have a SpriteRenderer who share a VBO, so I need to update this VBO on each frame for each sprite (change color, uvs, …).

The visual glitch is not present on static element (like text).

So my question his:

• Did I have to do something with my VAO on each frame?

Here is what I've got:

Init part:

- bind vao
-> Bind vbo
-> Bind ibo
- unbind vao

Rendering part:

for( sprites )
{
// Update (Need to bind VAO here?)
bind vbo (lock)
update vbo data
unbind vbo (unlock + bind)

// Draw.
bind vao
drawElement
unbind vao
}


Thanks!

• I don't know the answer, but there is nothing wrong with binding the vao before the vbo in your for loop, so try that and see if it helps? It's fairly obvious that it's some glitch/feature on those devices that creates the issue, so try and see if changing the order of things fixes it. Also, you probably want to bind/unbind your vao outside the for loop anyways, only change the binding if you need to bind something else to reduce the number of opengl calls. Mar 6 '15 at 15:32
• Sadly it didn't help. I've made a "pseudo" exemple here, in reality it's more complicated in my engine, sprites are batched, and elements are sorted by Material and Depth. Thanks for the response! Mar 7 '15 at 21:57