   [MDX] Problem creating a Mesh from Vertex and Index Buffers
  I just found an item within the help files about the Mesh object.  I've not been using meshes yet so not really looked into it until I see that someone had created a mesh from a set of vertices.So I looked at the example code and tried to implement it.  But no luck.I have an array of vertices (PositionNormalColored) and an array of indices (Int16 which I believe is the equivalent of short).Now my program works fine without Meshifying the object made up of this array but when I try and generate the mesh using the following code:m_mesh = __gc new Mesh(m_faceCount,m_vertexCount,meshflags,m_cvformat,m_device);m_mesh->SetVertexBufferData(m_PNCVerts,LockFlags::None);m_mesh->SetIndexBufferData(m_indices,LockFlags::None);Int32 adjacency[] = __gc new Int32[m_mesh->NumberFaces * 3];m_mesh->GenerateAdjacency(0.01F, adjacency); m_mesh->OptimizeInPlace(MeshFlags::OptimizeVertexCache, adjacency); m_numSubSets = m_mesh->GetAttributeTable()->Length;So I basically create an object that uses my vertices and indices values (in a generic primitive class) and then I create a mesh from the values before I do anything else with it.Unfortunately this piece of code when I step through it doesn't seem to fill the Buffer or Array values and ultimately crashes out when trying to display it as a mesh.[edit] just changed title to better label the reason for posting.[Edited by - Xrystal on June 10, 2006 10:41:33 PM]