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