public MyLodModel AddData(MyRenderMessageSetRenderEntityData msg)
        {
            System.Diagnostics.Debug.Assert(msg.ModelData.Sections.Count > 0, "Invalid data");

            MyLodModel lodModel = new MyLodModel();

            lodModel.Model = new MyRenderModel(MyMeshDrawTechnique.MESH);
            ProfilerShort.Begin("LoadBuffers");
            lodModel.Model.LoadBuffers(msg.ModelData);
            ProfilerShort.BeginNextBlock("CloneMaterials");
            lodModel.Model.CloneMaterials(lodModel.MeshMaterials);
            ProfilerShort.End();
            lodModel.Distance = 0;

            m_localAABB         = (BoundingBoxD)lodModel.Model.BoundingBox;
            m_localVolume       = (BoundingSphereD)lodModel.Model.BoundingSphere;
            m_localVolumeOffset = (Vector3D)lodModel.Model.BoundingSphere.Center;
            m_volume            = m_localVolume;

            m_lods.Add(lodModel);
            m_isDataSet = true;

            return(lodModel);
        }
        public MyLodModel AddData(MyRenderMessageSetRenderEntityData msg)
        {
            System.Diagnostics.Debug.Assert(msg.ModelData.Sections.Count > 0, "Invalid data");

            MyLodModel lodModel = new MyLodModel();

            lodModel.Model = new MyRenderModel(MyMeshDrawTechnique.MESH);
            ProfilerShort.Begin("LoadBuffers");
            lodModel.Model.LoadBuffers(msg.ModelData);
            ProfilerShort.BeginNextBlock("CloneMaterials");
            lodModel.Model.CloneMaterials(lodModel.MeshMaterials);
            ProfilerShort.End();
            lodModel.Distance = 0;

            m_localAABB         = (BoundingBoxD)lodModel.Model.BoundingBox;
            m_localVolume       = (BoundingSphereD)lodModel.Model.BoundingSphere;
            m_localVolumeOffset = (Vector3D)lodModel.Model.BoundingSphere.Center;
            m_volume            = m_localVolume;

            m_lods.Add(lodModel);
            m_isDataSet = true;

            return lodModel;
        }