Conver VB to Mesh
// Initialise the D3DXMesh object:
D3DXCreateMeshFVF(10, CIRCLECOMPLEXITY, D3DXMESH_MANAGED | D3DXMESH_WRITEONLY, D3DFVF_VERTEX, g_pD3DDevice, &g_pCircleMesh);
g_pCircleMesh->LockVertexBuffer( D3DLOCK_NOSYSLOCK, (void**)&pVertices);
memcpy(pVertices, g_vCircle, sizeof(g_vCircle));
g_pCircleMesh->UnlockVertexBuffer();
g_pCircleMesh->LockIndexBuffer( D3DLOCK_NOSYSLOCK, (void**)&pVertices);
memcpy(pVertices, g_iCircle, sizeof(g_iCircle));
g_pCircleMesh->UnlockIndexBuffer();
// Then the call to draw:
g_pCircleMesh->DrawSubset(0);
D3DXMESH_MANAGED - Both IB and VB in managed pool.
D3DXMESH_WRITEONLY - Only writing, never reading ( change if your'e going to read ).
D3DLOCK_NOSYSLOCK - Don't wait to lock.
源文档 <http://www.gamedev.net/topic/386703-converting-vertex-buffer-to-d3dxmesh/>