akuehn3000 Posted June 5, 2004 Posted June 5, 2004 how can I read a vertexbuffer from a mesh? the following lines lead to invalidcallexception: //meshVertex is the struct for my vertexformat meshVertex[] buffer = new meshVertex[meshc.NumberVertices]; buffer = (meshVertex[])(meshc.VertexBuffer.Lock(0,typeof(meshVertex),LockFlags.None,meshc.NumberVertices)); does anyone know an example how to read vertexdata from a mesh properly? Quote
Kavan Posted June 5, 2004 Posted June 5, 2004 Try this: (meshVertex[])(meshc.LockVertexBuffer(typeof(meshVertex), LockFlags.None, meshc.NumberVertices)); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.