Vertex Buffer Question

I was wondering if it is possible to change the size of a vertex buffer after the buffer has been created The reason i ask is I am making some terrain that is made up of smaller grids but the number of vertices in the buffer need to change all the time because i do not want to always render all the vertices. Any help is appreciated. Thanks in advance.


Answer this question

Vertex Buffer Question

  • Tracy Cai

    Instead of recreating a vertex buffer everytime you have different amounds of data, you should read up on dynamic vertex buffers. Just create a vertex buffer with one size, preferable the size of your best guess of the maximum number of vertices you'd have in the buffer at any one time. Fill that buffer each frame and only send the new data to the graphics card. You dont have to send the entire vb every draw call.


  • Bob Abraham

    I think it is not possible. Just allocate a big buffer an use it only partially when you want...
  • Vertex Buffer Question