how to alternate 2 VBOs inside one VAO

I’m trying to implement a particle system using compute shader. I have 2 vertex buffer objects set up, I need to draw them alternatively every frame. Is there a way that I can alternate them inside the vertex array object? Or do I have to explicitly bind vbo and call glVertexAttribPointer every draw? Thanks in advance.


// 2 vertex buffer objects
GLuint m_posBO1;
GLuint m_posBO2;

glBindVertexArray(m_vao);

glBindBuffer(GL_ARRAY_BUFFER, m_posBO1);
// position attribute
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0);

GL_ARB_vertex_attrib_binding is ideal for this kind of use case - it’s just a single glBindVertexBuffer call.

that’s it. thank you