Ejemplo n.º 1
0
		private void SwapThread()
		{
			var waitEvents = new[]
			                 	{
									_showFinishedEvent,
									_renderFinishedEvent,
									_clearFinishedEvent
			                 	};
			var startEvents = new[]
			                  	{
			                  		_showEvent,
			                  		_renderEvent,
			                  		_clearEvent
			                  	};

			for (; ; )
			{
				WaitHandle.WaitAll(waitEvents);
				Swapped();
				waitEvents.ResetAll();
				startEvents.SetAll();
			}
		}
Ejemplo n.º 2
0
		private void SwapThread()
		{
			var waitEvents = new[]
			                 	{
									_showFinishedEvent,
									_renderFinishedEvent,
									_clearFinishedEvent
			                 	};
			var startEvents = new[]
			                  	{
			                  		_showEvent,
			                  		_renderEvent,
			                  		_clearEvent
			                  	};

			while (_frameBufferManagerAlive)
			{
				WaitHandle.WaitAll(waitEvents);
				Swapped();
				waitEvents.ResetAll();
				startEvents.SetAll();
			}
		}