   2D Vertex Animation with D3D
  I'm a noob to D3D9 (previously used OpenGL and SDL for graphics), so I am wondering what the best way to achieve vertex animation in D3D. This is what I am trying to do: I have an array of Vertex locations that define an object, and I want D3D to render a textured polygon based on the current locations of the verticies. Something like this could be used for 2D Skeletal Animation.After some research I have not found any function in D3D that allows me to send it an array of verticies so it can be rendered. The DrawPrimitive and DrawIndexedPrimitive seem to require that a stream source be set (i.e. a vertex buffer) before rendering. However, since vertex buffers are stored in hardware (correct?) then there is no way of changing the vertex positions (correct?), unless I resort to using a shader.So, do you think my best option is to look into animating my 2D skeletons using HLSL shaders? Or is there an easier option that is still just as efficient (I believe that DrawPrimitiveUP is not efficient). Please excuse me if there is a very easy answer to this question as I am new to D3D9.   
  There are flags that can be set that will let d3d know that you are going to change the vertex buffer often, and d3d will manage it optimally.  The creation flags are D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, and when you lock you vertex bufer use the flag D3DLOCK_DISCARD.It's a good idea to make a oversized buffer and try to reduce the number of DrawPrimitive callls.  The usual way for 2d is to sort the vertices by texture and do 1 DrawPrimitive per texture that you draw.  You can reduce this further by putting multiple images on one texture.   