Ejemplo n.º 1
0
        public void Dispose()
        {
            if (State == (int)States.Disposed)
            {
                return;
            }

            foreach (var batch in BatchesToRelease)
            {
                batch.ReleaseResources();
            }

            BatchesToRelease.Clear();

            var _batches = Batches.GetBuffer(false);

            for (int i = 0; i < Batches.Count; i++)
            {
                var batch = _batches[i];
                if (batch != null)
                {
                    batch.ReleaseResources();
                }
            }

            Batches.Dispose();

            RenderManager.ReleaseFrame(this);

            State = (int)States.Disposed;
        }
Ejemplo n.º 2
0
        public void Dispose()
        {
            if (State == (int)States.Disposed)
            {
                return;
            }

            foreach (var batch in BatchesToRelease)
            {
                batch.ReleaseResources();
            }

            BatchesToRelease.Clear();

            Batch temp;

            for (int i = 0, c = Batches.Count; i < Batches.Count; i++)
            {
                if (Batches.TryGetItem(i, out temp))
                {
                    temp.ReleaseResources();
                }
            }

            Batches.Dispose();

            RenderManager.ReleaseFrame(this);

            State = (int)States.Disposed;
        }
Ejemplo n.º 3
0
        public void Dispose()
        {
            if (State == State_Disposed)
            {
                return;
            }

            var _batches = Batches.GetBuffer();

            for (int i = 0; i < Batches.Count; i++)
            {
                var batch = _batches[i];
                if (batch != null)
                {
                    batch.ReleaseResources();
                }
            }

            _ListPool.Release(ref Batches);

            RenderManager.ReleaseFrame(this);

            State = State_Disposed;
        }