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);
|
||||||
|
|
||||||
|
if (swapchainTexture != null)
|
||||||
|
{
|
||||||
commandBuffer.BeginRenderPass(
|
commandBuffer.BeginRenderPass(
|
||||||
new ColorAttachmentInfo(swapchainTexture, Color.CornflowerBlue)
|
new ColorAttachmentInfo(swapchainTexture, Color.CornflowerBlue)
|
||||||
);
|
);
|
||||||
|
|
||||||
commandBuffer.EndRenderPass();
|
commandBuffer.EndRenderPass();
|
||||||
|
}
|
||||||
|
|
||||||
GraphicsDevice.Submit(commandBuffer);
|
GraphicsDevice.Submit(commandBuffer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue