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);
            }
Ejemplo n.º 2
0
        internal void UpdateMesh(MyRenderMessageUpdateMergedVoxelMesh updateMessage)
        {
            if (!MyRenderProxy.Settings.EnableVoxelMerging)
            {
                return;
            }

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

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

            ProfilerShort.End();
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
            }
Ejemplo n.º 9
0
 internal void UpdateMergedMesh(MyRenderMessageUpdateMergedVoxelMesh msg)
 {
     m_mergeHandler.UpdateMesh(msg);
 }
Ejemplo n.º 10
0
 internal void UpdateMergedMesh(MyRenderMessageUpdateMergedVoxelMesh msg)
 {
     m_mergeHandler.UpdateMesh(msg);
 }