Archived

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

Creating mesh in c# from vertex data problem

This topic is 5433 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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