   MESH to VertexBuffer
  I have a problem, in fact I am not sure if I have a problem.First of all I am trying to develop a maze game like FPS games. I am a beginner in this topic,game development.So what is my problem?I have a model class.I am loading my mesh from a .x file in this class and I have also Render method for a model to render it as below... public void Render(Device device)   {  for (int i = 0; i < modelMetarial.Length; i++)  { device.Material = modelMetarial; device.SetTexture(0, modelTexture); modelMesh.DrawSubset(i);   }}I know that every mesh is converted or it can be said,it was filled to the vertexbuffer. So how can I do this? I want to this because I am going to make some transforms operations on my mesh.I am not sure if I am on right way...But if you can help me about this,I am going to be very happy
  Well, it depends on what kind of transformations you want to perform. If you simply want the typical uniform transformations of translation, rotation and scaling, you should set the device.Transform.World matrix to the translation you want. This will apply the transformation Matrix you specify to every vertex in the mesh.If you really want to edit some/all vertices in the Mesh, you'll indeed have to edit the vertex data in the VertexBuffer encapsulated in the Mesh. You can access this VertexData by locking the Mesh's VertexBuffer (accessable through the VertexBuffer property of the mesh object). You can find more information on locking, reading and writing vertex buffer at this here MSDN page, at the right of the page under How do I...?. This documentation is from October 2004, but it should get you started and you should be able to access more recent information from this page.Finally, you might want to consider a vertex shader if you regularly need to update the Vertex data. Writing into and reading from VertexBuffers is expensive and it's normally a good idea to avoid it when possible. If you need to edit you vertices every frame (for waves, windblown grass etc), a vertex shader will allow you to do this at virtually no performance penalty. Shaders are a bit of an advanced topic, so I don't know if you should get into that as a beginning beginner, but if you check the SDK's samples, it should have plenty of info on using them (looks for samples using 'Effects').Hope this helps, as I'm gonna give my sleepy brain a bit of rest now :);  thanks a lot...It really shows me a way to go...   