private void Update(object sender, EventArgs e) { swapChain.BeginFrame(); commandList.StartRecording(); commandList.PerformResourceTransition(CommandList.BarrierType.Immediate, swapChain.ActiveBackBuffer, ResourceUsage.ReadWriteUsage.Present, ResourceUsage.ReadWriteUsage.RenderTargetColor); commandList.SetRenderTargets(descHeapRenderTargets, swapChain.ActiveSwapChainBufferIndex, null, 0); commandList.ClearRenderTargetView(CommandList.ClearTarget.Color, new Vector4(1.0f, 0.0f, 1.0f, 1.0f)); commandList.PerformResourceTransition(CommandList.BarrierType.Immediate, swapChain.ActiveBackBuffer, ResourceUsage.ReadWriteUsage.RenderTargetColor, ResourceUsage.ReadWriteUsage.Present); commandList.EndRecording(); commandQueue.ExecuteCommandList(commandList); swapChain.EndFrame(); }