Exemple #1
0
        public void PushMapReferences(M2Instance[] instances)
        {
            lock (mAddLock)
            {
                foreach (var instance in instances)
                {
                    if (instance == null || instance.RenderInstance == null || instance.RenderInstance.IsUpdated)
                        continue;

                    M2BatchRenderer renderer;
                    if (mRenderer.TryGetValue(instance.Hash, out renderer))
                        renderer.PushMapReference(instance);
                }
            }
        }
        public void PushMapReference(M2Instance instance)
        {
            M2RenderInstance inst;
            lock (mFullInstances)
            {
                if (mFullInstances.TryGetValue(instance.Uuid, out inst) == false)
                    return;
            }

            inst.IsUpdated = true;

            lock (mInstanceBufferLock)
                mVisibleInstances.Add(inst);
        }