/// <summary>Initializes a new instance of the <see cref="GameBoyMemoryBus"/> class.</summary> public GameBoyMemoryBus() { videoTripleBufferingSystem = new AsyncTripleBufferingSystem <VideoFrameData>(() => new VideoFrameData(this)); videoRenderingEngine = new VideoRenderingEngine(videoTripleBufferingSystem.ConsumerBufferProvider); videoFrameData = videoTripleBufferingSystem.ProducerBufferProvider.SwapBuffers(); Initialize(); }
public VideoRenderingEngine(AsyncTripleBufferingSystem <VideoFrameData> .ConsumerSideBufferProvider bufferProvider) { this.bufferProvider = bufferProvider; this.renderingContext = new ThreadSynchronizationContext(LoopRender, "Rendering Engine"); }