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