   [DX10] Buffer sizes are static?
  I'm writing a small test application to see how the PolyVox library is working, and I've got a problem with my vertex buffer here.Is the size of my buffer static? When I create it, I have to specify the size, like this:int plhd=0; //Placeholder//Create the vertex bufferD3D10_BUFFER_DESC bufferDesc;    bufferDesc.ByteWidth =  sizeof(int);//sizeof(VertexStruct)*NumVertices;    bufferDesc.Usage =  D3D10_USAGE_DYNAMIC;    bufferDesc.BindFlags = D3D10_BIND_VERTEX_BUFFER;    bufferDesc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE;    bufferDesc.MiscFlags = 0;Notice, that I put a placeholder in there, because I want to map() this buffer when the mesh changed, and fill it with the new vertices. And of course, it isn't staying at the same polycount.Is there a way to do it like this, or do I have to recreate my buffer every time the mesh changed?   
  Yes, the size cannot be changed after the buffer is created. You can think of it just like a normal memory allocation you would make with "new" or "malloc", except it's from a different memory pool. If you want to have a dynamic number of elements in a buffer, you can do it just like std::vector does it: allocate a certain amount, keep track of how much the buffer is used, and re-allocate if you run out of room.   ;  Okay, this turns another question up: How fast is the creation of such a buffer? Fast enough to do it every, lets say, 5 frames?   ;  Today’s drivers are somewhat smart when it comes to buffer recreation. But you should limit the times you do it. In general you should not allocate the exact size you need. Depending on how fast your polygon grows make it large enough to survive some grows without reallocation.   