title: What is the proper way to modify OpenGL vertex buffer?
body: <p>I'm setting up a vertex buffer in OpenGL, like this:</p>
  
  <pre><code>int vboVertexHandle = glGenBuffers();
  glBindBuffer(GL_ARRAY_BUFFER, vboVertexHandle);
  glBufferData(GL_ARRAY_BUFFER, vertexData, GL_DYNAMIC_DRAW);
  </code></pre>
  
  <p>Later, if I want to add or remove vertices to "vertexData", what is the proper way to do this? Is it even possible? I'm assuming I can't just modify the array directly without re-sending it to the GPU.</p>
  
  <p>If I modify the vertexData array, then call this again:</p>
  
  <pre><code>glBindBuffer(GL_ARRAY_BUFFER, vboVertexHandle);
  glBufferData(GL_ARRAY_BUFFER, vertexData, GL_DYNAMIC_DRAW);
  </code></pre>
  
  <p>...will that overwrite the old buffer with my new data? Or do I also have to delete the old one? Is there a better way?</p>