swapchainTexture null check
							parent
							
								
									dbaadccd47
								
							
						
					
					
						commit
						88e6d48d50
					
				|  | @ -26,11 +26,14 @@ namespace ProjectName | ||||||
| 			var commandBuffer = GraphicsDevice.AcquireCommandBuffer(); | 			var commandBuffer = GraphicsDevice.AcquireCommandBuffer(); | ||||||
| 			var swapchainTexture = commandBuffer.AcquireSwapchainTexture(MainWindow); | 			var swapchainTexture = commandBuffer.AcquireSwapchainTexture(MainWindow); | ||||||
| 
 | 
 | ||||||
| 			commandBuffer.BeginRenderPass( | 			if (swapchainTexture != null) | ||||||
| 				new ColorAttachmentInfo(swapchainTexture, Color.CornflowerBlue) | 			{ | ||||||
| 			); | 				commandBuffer.BeginRenderPass( | ||||||
|  | 					new ColorAttachmentInfo(swapchainTexture, Color.CornflowerBlue) | ||||||
|  | 				); | ||||||
| 
 | 
 | ||||||
| 			commandBuffer.EndRenderPass(); | 				commandBuffer.EndRenderPass(); | ||||||
|  | 			} | ||||||
| 
 | 
 | ||||||
| 			GraphicsDevice.Submit(commandBuffer); | 			GraphicsDevice.Submit(commandBuffer); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue