Esempio n. 1
0
        public override void Reset(RenderContext context)
        {
            base.Reset(context);

            shaderDataPoolCascade1.Clear();
            shaderDataPoolCascade2.Clear();
            shaderDataPoolCascade4.Clear();
        }
Esempio n. 2
0
        public override void Reset()
        {
            foreach (var data in dataPool)
            {
                data.Reset();
            }

            dataPool.Clear();
        }
        public virtual void Reset(RenderContext context)
        {
            foreach (var view in shadowRenderViews)
            {
                context.RenderSystem.Views.Remove(view);
            }

            shadowRenderViews.Clear();
            shadowMaps.Clear();
        }
Esempio n. 4
0
        public void ProcessPointerEvents(TimeSpan deltaTime, List <PointerEvent> events, List <GestureEvent> outputEvents)
        {
            ElapsedSinceBeginning += deltaTime;
            ElapsedSinceLast      += deltaTime;

            CurrentGestureEvents.Clear();
            ProcessPointerEventsImpl(deltaTime, events);
            for (int i = 0; i < CurrentGestureEvents.Count; i++)
            {
                outputEvents.Add(CurrentGestureEvents[i]);
            }
        }
        internal void AllocateCollectionsPerGroupOfCullingMask()
        {
            // Clear the pool (but keep instances already created)
            lightCollectionPool.Clear();

            // At worst, we have 32 collections (one per bit active in the culling mask)
            for (int i = 0; i < groupMasks.Length; i++)
            {
                var mask = groupMasks[i++];
                if (mask == 0)
                {
                    continue;
                }

                // Check if there is a previous collection for the current mask
                int collectionIndex = -1;
                for (int j = 0; j < lightCollectionPool.Count; j++)
                {
                    if ((uint)lightCollectionPool[j].CullingMask == mask)
                    {
                        collectionIndex = j;
                        break;
                    }
                }

                // If no collection found for this mask, create a new one
                if (collectionIndex < 0)
                {
                    collectionIndex = lightCollectionPool.Count;

                    // Use a pool to avoid recreating collections
                    var collection = lightCollectionPool.Add();

                    // The selected collection is associated with the specified mask
                    collection.CullingMask = (EntityGroupMask)mask;
                }

                // Store the index of the collection for the current bit
                groupMasks[i] = (uint)collectionIndex;
            }
        }
 public override void Reset()
 {
     shaderDataPoolCascade1.Clear();
     shaderDataPoolCascade2.Clear();
     shaderDataPoolCascade4.Clear();
 }
Esempio n. 7
0
 public override void Reset()
 {
     shaderDataPool.Clear();
 }