public void SetNextRenderOperation(IDeferredRenderOperation op) { lock (_lock) { _nextRenderOperation?.Dispose(); _nextRenderOperation = op; } }
public void SetNextRenderOperation(IDeferredRenderOperation op) { while (true) { lock (_lock) { if (_nextRenderOperation == null) { _nextRenderOperation = op; return; } } _canSetNextOperation.WaitOne(); } }
private void OnRenderTick() { IDeferredRenderOperation op = null; lock (_lock) { if (_nextRenderOperation != null) { op = _nextRenderOperation; _nextRenderOperation = null; } } if (op != null) { op?.RenderNow(); op?.Dispose(); } }
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(); } }