internal void UpdateMesh(MyRenderMessageUpdateMergedVoxelMesh updateMessage)
            {
                int divideIndex = GetDivideIndexFromMergeCell(ref updateMessage.Metadata.Cell.CoordInLod);

                // A job wasn't cancelled in time and made it here
                if (m_mergeJobs[divideIndex].CurrentWorkId != updateMessage.WorkId)
                {
                    return;
                }

                MyMergedLodMeshId mergedId = MyMeshes.GetMergedLodMesh(m_mergedLodMeshProxies[divideIndex].MeshId, 0);
                bool mergeSuccessful       = m_mergedLodMeshProxies[divideIndex].UpdateMergedMesh(updateMessage);

                if (mergeSuccessful)
                {
                    Debug.Assert(mergedId.Info.MergedLodMeshes.Count == 0, "Merging into an already merged mesh");
                    mergedId.Info.MergedLodMeshes.UnionWith(m_mergeJobs[divideIndex].LodMeshesBeingMerged);
                    SwitchMergeState(divideIndex, true);
                }
                else
                {
                    mergedId.Info.PendingLodMeshes.UnionWith(m_mergeJobs[divideIndex].LodMeshesBeingMerged);
                }

                ResetMerge(divideIndex);
            }
Example #2
0
        internal void UpdateMesh(MyRenderMessageUpdateMergedVoxelMesh updateMessage)
        {
            if (!MyRenderProxy.Settings.EnableVoxelMerging)
            {
                return;
            }

            m_mergesPerLod[updateMessage.Lod].UpdateMesh(updateMessage);
        }
Example #3
0
        internal void UpdateMergedMesh(MyRenderMessageUpdateMergedVoxelMesh msg)
        {
            ProfilerShort.Begin("MyClipmapHandler.UpdateMergedMesh");

            if(m_mergeHandler != null)
                m_mergeHandler.UpdateMesh(msg);

            ProfilerShort.End();
        }
Example #4
0
        internal void UpdateMergedMesh(MyRenderMessageUpdateMergedVoxelMesh msg)
        {
            ProfilerShort.Begin("MyClipmapHandler.UpdateMergedMesh");

            if (m_mergeHandler != null)
            {
                m_mergeHandler.UpdateMesh(msg);
            }

            ProfilerShort.End();
        }
        internal bool UpdateMergedMesh(MyRenderMessageUpdateMergedVoxelMesh msg)
        {
            if (!MyMeshes.UpdateMergedVoxelCell(MeshId, ref msg.Metadata, msg.MergedBatches))
                return false;
            
            m_scale = msg.Metadata.PositionScale;
            m_translation = msg.Metadata.PositionOffset;
            m_localAabb = msg.Metadata.LocalAabb;

            UpdateActorInfo();

            return true;
        }
Example #6
0
        internal bool UpdateMergedMesh(MyRenderMessageUpdateMergedVoxelMesh msg)
        {
            if (!MyMeshes.UpdateMergedVoxelCell(MeshId, ref msg.Metadata, msg.MergedBatches))
            {
                return(false);
            }

            m_scale       = msg.Metadata.PositionScale;
            m_translation = msg.Metadata.PositionOffset;
            m_localAabb   = msg.Metadata.LocalAabb;

            UpdateActorInfo();

            return(true);
        }
        internal void UpdateMesh(MyRenderMessageUpdateMergedVoxelMesh updateMessage)
        {
            if (!MyRenderProxy.Settings.EnableVoxelMerging)
                return;

            m_mergesPerLod[updateMessage.Lod].UpdateMesh(updateMessage);
        }
            internal void UpdateMesh(MyRenderMessageUpdateMergedVoxelMesh updateMessage)
            {
                int divideIndex = GetDivideIndexFromMergeCell(ref updateMessage.Metadata.Cell.CoordInLod);

                // A job wasn't cancelled in time and made it here
                if (m_mergeJobs[divideIndex].CurrentWorkId != updateMessage.WorkId)
                    return;

                MyMergedLodMeshId mergedId = MyMeshes.GetMergedLodMesh(m_mergedLodMeshProxies[divideIndex].MeshId, 0);
                bool mergeSuccessful = m_mergedLodMeshProxies[divideIndex].UpdateMergedMesh(updateMessage);
                if (mergeSuccessful)
                {
                    Debug.Assert(mergedId.Info.MergedLodMeshes.Count == 0, "Merging into an already merged mesh");
                    mergedId.Info.MergedLodMeshes.UnionWith(m_mergeJobs[divideIndex].LodMeshesBeingMerged);
                    SwitchMergeState(divideIndex, true);
                }
                else
                    mergedId.Info.PendingLodMeshes.UnionWith(m_mergeJobs[divideIndex].LodMeshesBeingMerged);

                ResetMerge(divideIndex);
            }
Example #9
0
 internal void UpdateMergedMesh(MyRenderMessageUpdateMergedVoxelMesh msg)
 {
     m_mergeHandler.UpdateMesh(msg);
 }
 internal void UpdateMergedMesh(MyRenderMessageUpdateMergedVoxelMesh msg)
 {
     m_mergeHandler.UpdateMesh(msg);
 }