This topic is now archived and is closed to further replies.


Creating mesh in c# from vertex data problem

Recommended Posts

nerdboy80    128
Newbie to DX, so bear with me... I am doing the following: ------------------------------------------------- _trackMesh = new Mesh(300, 900, MeshFlags.Managed | MeshFlags.VbWriteOnly, CustomVertex.PositionNormal.Format, d); CustomVertex.PositionNormal [] vertdata2 = (CustomVertex.PositionNormal[]) _trackMesh.LockVertexBuffer(typeof(CustomVertex.PositionNormal), LockFlags.None); ------------------------------------------------- But, when I look at vertdata2 it reports it''s length as 0. Do I need to explicitly create the vertex buffer for this mesh? How would I do that? Thanks, NerdBoy

Share this post

Link to post
Share on other sites