public void Draw(SlimDX.Direct3D9.Device device)
        {
            device.SetStreamSource(0, VertexBuffer, 0, VertexStreamLayout.Size);
            device.VertexFormat = VertexStreamLayout.VertexFormat;

            if (MeshType == MeshType.Indexed)
            {
                device.Indices = IndexBuffer;
                device.DrawIndexedPrimitives(SlimDX.Direct3D9.PrimitiveType.TriangleList, 0, 0, NVertices, 0, NFaces);
            }
            else if (MeshType == MeshType.TriangleStrip)
            {
                device.DrawPrimitives(SlimDX.Direct3D9.PrimitiveType.TriangleStrip, 0, NFaces);
            }
        }