private SModelMesh convertToMyMesh(GraphicsDevice device, SRenderInfoMesh renderMess) { SModelMesh result = new SModelMesh(); result.vertexBuffer = new VertexBuffer(device, _vertexSizeInBytes, BufferUsage.WriteOnly); result.vertexBuffer.SetData(renderMess.vertex_info); result.texture = _coreModel.getTexture(renderMess.texture_name); result.numPrimitives = renderMess.vertex_info.Length / 3; return result; }
public void Update(GraphicsDevice device, GameTime gameTime) { _coreModel.UpdateModel(device, gameTime); _meshes = new List<SModelMesh>(); SModelMesh mesh = new SModelMesh(); mesh.vertexBuffer = _coreModel.vertexBuffer; mesh.texture = _coreModel.GetTexture(); mesh.numPrimitives = _coreModel.GetNumTriangles(); _meshes.Add(mesh); }