title: How to properly update vertex buffers in DirectX 10
body: <p>For a little background: I am working on a project in C++ in which I am trying to draw 3D representations of objects based on real time profile data.  The profiling data is gathered from external profiling hardware.  The system travels along an object and at a rate of 300 times per second provides my software with a profile slice.  Each slice consists of a list of ~8000 X-Y points.  The movement of the profiler is recorded by an encoder.  The encoder information provides the 3rd dimension of the scan.</p>
  
  <p>Another important thing to note is that the profiler may move back and forth over the object.  As this happens, I want to replace previously read/drawn slices with new ones (based on encoder position).  As of now, I am achieving this with a circular buffer of slices that I store by the encoder count.  This also means that I will want to throw out slices as the buffer fills and begins overwriting old slices.  In order to show the proper amount of the subject piece on the screen - I need to draw 1000 slices of profile data at a time.  For now I am rendering the object as a point cloud.  In the future we may attempt to attach adjacent slices and render as a triangle list.</p>
  
  <p>I am new to DirectX, but using books and online examples I've gotten to the point where I am drawing the object in 3D, but I am convinced that I am not efficiently/properly using Vertex Buffers.  Most examples I've found work with very static models.  Therefore, they tend to create a single Vertex Buffer with their list of points, and then are just manipulated by matrix transformations.  I, on the other hand, will be updating the scene very quickly as I retrieve profile data from our hardware.</p>
  
  <p>Currently I am creating a new Vertex Buffer for each slice I read in.  When I draw the scene I loop through my list of up to 1000 buffers and call Draw() for each one.  I noticed that if I cut in half the number of Vertex Buffers drawn at a time, my FPS increased significantly, whereas there was little improvement when halving the number of Vertex Points per buffer - so I take that as an indication that the multiple Vertex Buffers is not the proper way to approach this.</p>
  
  <p>So to the guts of my question... I'm wondering if I can put all these vertices in a single Vertex Buffer when the Vertices change so frequently.  Can I update the points within an existing Vertex Buffer?  Or should I just recreate a single brand new Buffer each time I update the scene?  One last thing to keep in mind is that the number of points per slice from the hardware will vary - so when it comes to over-writing previous slices, the new slice may have more or fewer points than the slice being replaced.</p>
  
  <p>Thanks for your time.  Any advice will be much appreciated!</p>