示例#1
0
 public void SetNextRenderOperation(IDeferredRenderOperation op)
 {
     lock (_lock)
     {
         _nextRenderOperation?.Dispose();
         _nextRenderOperation = op;
     }
 }
示例#2
0
 public void SetNextRenderOperation(IDeferredRenderOperation op)
 {
     while (true)
     {
         lock (_lock)
         {
             if (_nextRenderOperation == null)
             {
                 _nextRenderOperation = op;
                 return;
             }
         }
         _canSetNextOperation.WaitOne();
     }
 }
示例#3
0
        private void OnRenderTick()
        {
            IDeferredRenderOperation op = null;

            lock (_lock)
            {
                if (_nextRenderOperation != null)
                {
                    op = _nextRenderOperation;
                    _nextRenderOperation = null;
                }
            }
            if (op != null)
            {
                op?.RenderNow();
                op?.Dispose();
            }
        }
示例#4
0
        public void OnRenderTick()
        {
            IDeferredRenderOperation op = null;

            lock (_lock)
            {
                if (_nextRenderOperation != null)
                {
                    op = _nextRenderOperation;
                    _nextRenderOperation = null;
                }
                _canSetNextOperation.Set();
            }
            if (op != null)
            {
                op?.RenderNow(null);
                op?.Dispose();
            }
        }